Help running this command on adb? - Android Q&A, Help & Troubleshooting

I saw a post on reddit about sanitizing an android device but I was wondering how I could execute the command? I managed to root my device but I'm at a loss as to how to execute it. Through adb? But it doesn't seem to be a valid command.
Help is much appreciated.
The script is:
Code:
cd /data; for i in 0 1 2 3 4 5 6 7 8 9; do cat /dev/urandom > $i; rm $i; done

thumbtwists said:
I saw a post on reddit about sanitizing an android device but I was wondering how I could execute the command? I managed to root my device but I'm at a loss as to how to execute it. Through adb? But it doesn't seem to be a valid command.
Help is much appreciated.
The script is:
Click to expand...
Click to collapse
Do you know what these commands are supposed to do?
Sent from my Sony Xperia Z3 Compact using XDA Labs

Ticklefish said:
Do you know what these commands are supposed to do?
Sent from my Sony Xperia Z3 Compact using XDA Labs
Click to expand...
Click to collapse
Yeah, the poster described it as:
"That will perform a deletion of free space that is superior to "military grade", and unlike some proprietary app, I know exactly what it's doing.
PS. In case you can't read it- It loops 10 times. Each loop it creates a file, starting with the file name "/data/0". It fills that file with random information and will stop when the storage area is full. All freespace will have been consumed by the random information in that file. Then immediately delete the file, and the space will be free again, and the freespace will be random information. Repeat this process 9 more times with file names "1", "2", "3", and so on..."

Related

[how-to] Root the Slide (MAC OSX FLAVORED)

HOW-TO Root the Slide
(MAC OSX FLAVORED) KAPOWWW!!!!
&
Android SDK on Mac
STEP 1.
Download Android SDK from here.
STEP 2.
Unzip it. Place the folder it creates in your Documents folder and rename it AndroidSDK or SDK. (Something Easy)
SUCCESS!!! Android SDK Installed… //WTF!!??!!
STEP 3.
Download This Package > Slide Root.zip
Place the Contents of "Slide Root.zip" into your Android SDK Tools folder.
(These five files need to be placed DIRECTLY into the AndroidSDK/tools/ folder)
STEP 4.
RENAME Loop.bat to Loop.sh, then right click, open with TEXTEDIT.
Delete it’s contents and replace it with
#!/bin/bash
while [ 1 ]
do
adb devices
done
Save and Close the File.
STEP 5.
On your Slide, GO TO Settings > Application > Development and turn on USB Debugging.
This should save you headaches.
NOW… Power Off the Slide
STEP 6.
OPEN Terminal
(APPLE + SPACE and type Terminal, press enter.)
Now, CD to the SDK/Tools Directory.
It should be where we left it.
/Users/YOURUSERNAME/Documents/AndroidSDK/tools/
Terminal SHOULD open with it already in your USERNAME
Type cd Documents/AndroidSDK/tools/
STEP 7.
Power On the Slide into the Bootloader by Holding Down ( Volume Down + Power Button )
STEP 8.
NOW run your loop file (the one we made earlier)
The Terminal should be all queued up to the Tools folder.
Type in ./loop.sh
(The Terminal should be blowing up with List of Devices Attached over and over)
STEP 9.
Once your loop is running, select Recovery from the bootloader menu.
(Volume UP & DOWN to change selection and POWER to Select)
STEP 10.
When recovery loads, you should Have an Offline Device.
The Slide’s screen will have a picture of a Phone and RED triangle around a !
(Don’t freak out, this is a good thing.)
Hit Ctrl + C to stop your script & see.
If this doesn't happen, Power Off and try again from STEP 7.
STEP 11.
Un-plug your USB cable from your Slide & Plug it back in for it to Detect ADB Correctly!!!
IMPORTANTE!!!
At this point you can adb devices to see if it detects your device and that it is in recovery mode.
Type into Terminal ./adb devices
If it says recovery you are golden and move onto STEP 12 to kick the habit.
If not, rinse and repeat from STEP 7.
STEP 12.
Select Update.zip from the menu. (This will fail, but we already know that! Select it anyway).
STEP 13.
Type into Terminal
./adb push ota.zip /sdcard/update.zip
STEP 14.
Type into Terminal
./adb push slideroot.zip /sdcard
STEP 15.
MUY IMPORTANTE!!!
Have this Command ready in your Terminal before applying update.zip again!!
./adb push update.zip /sdcard
STEP 16.
On your Slide, Hit run update.zip
As soon as you see A Little Bar appear behind the text
Push ENTER to execute the Terminal command
(./adb push update.zip /sdcard )
STEP 17.
If successful, you should see Clockwork Recovery.
If unsuccessful, repeat steps 13-16.
STEP 18.
In Clockworkmod Recovery,
Go to the Partitions menu and Mount System
(It should be at the top and the only one not mounted.)
STEP 19.
Go one level back & select install any zip from sdcard.
Select slideroot.zip & apply update from zip
(This will finish the Root process).
STEP 20.
Reboot your phone & wait for it to load completely.
To confirm that your slide is connected as a device use the command ./adb devices
If this works, you will see it as a device. Your prompt will say something like:
$ ./adb devices
List of devices attached
HT05YUP12710 device
STEP 21.
./adb install Superuser.apk
(If it says it cannot locate directories, make sure you can find your device
using ./adb devices… If things still don't work, my best advice is to start over)
STEP 22.
After Superuser is installed try to use adb to shell to your device.
Type in Terminal
./adb shell
you will get a $
Then type su
On the Slide, Superuser should pop-up asking if you give permission, do so.
In Terminal, your $ should turn into a #. If so, you have root. WOOT!!!​
Original SHOUT OUTS!!!
Special Thanks to:
Paul O'Brien:
Koushik K. Dutta:
&
The Guys using the Incredible OTA Spoofing Method
&
ChiefzReloaded for Huge amount of Suggestion & Brain Storming.
But most of all, you should thank eugene373 for rooting the slide and not sleeping for two days.
His original post is here.
sk8rbebop said:
STEP 14.
Type into Terminal
./adb push slideroot.zip​
Click to expand...
Click to collapse
should it not be:
./adb push slideroot.zip /sdcard
Also...
sk8rbebop said:
STEP 15.
VERY IMPORTANTE!!! ​
Click to expand...
Click to collapse
Should be:
MUY IMPORTANTE!!!
I don't understand the need for a separate post when the only difference between osx and windows is that osx uses a shell script and windows a batch file and osx is discussed in the post about rooting.
nerdcorerising said:
I don't understand the need for a separate post when the only difference between osx and windows is that osx uses a shell script and windows a batch file and osx is discussed in the post about rooting.
Click to expand...
Click to collapse
Five different people asked for it so they got it.
Thanks!
Thanks a bunch for the tutorial! We really do appreciate it. I just had a couple questions about 2 of the steps.
STEP 6.
OPEN Terminal
(APPLE + SPACE and type Terminal, press enter.)
Now, CD to the SDK/Tools Directory.
It should be where we left it.
/Users/YOURUSERNAME/Documents/AndroidSDK/tools/
Terminal SHOULD open with it already in your USERNAME
Type cd Documents/AndroidSDK/tools/
I got lost where it says "Now, CD to the SDK/Tools Directory." I do not really know what the CD means and what I should be typing into Terminal?
Also should my phone already be plugged in to my Mac?
Please let me know and thanks!
Thanks a bunch for this tutorial. I am about to try to ROOT, it should go over smoothly. Now from the ROOT what else have you guys been doing to you're Slide? I know Cyanogen has not said much, that is who I used for my myTouch 3G and my G1.
Click to expand...
Click to collapse
I flashed the Eng Build, then SlideMEROOT2 and then the new radio (you need this). Just follow the how-to's already posted, but remember to type ./ before the commands in Terminal.
Ex. ./adb devices Instead of adb devices.
There were a couple people who were trying to keep their original stock rom, but slidemeroot2 is basically the original rom. Plus, someone posted the original stock backup, so flash away.
-------------------------------------
Sent via the XDA Tapatalk App
this is wrong
#!/bin/bash
while [ 1 ]
do
adb devices
done
it should be
#!/bin/bash
while [ 1 ]
do
./adb devices
done
shadowleo85 said:
this is wrong
#!/bin/bash
while [ 1 ]
do
adb devices
done
it should be
#!/bin/bash
while [ 1 ]
do
./adb devices
done
Click to expand...
Click to collapse
It's no more "wrong" than your code...
The first assumes that you've configured your shell to link the "adb" command to the adb "app" in the sdk/tools directory. Your code assumes that you will be activating the script while "within" that very directory.
The code, IMHO, should read:
Code:
...
[PATH TO SDK/TOOLS/]adb devices
...
And the OS X user should be instructed to insert their own path.
HebrewToYou said:
It's no more "wrong" than your code...
The first assumes that you've configured your shell to link the "adb" command to the adb "app" in the sdk/tools directory. Your code assumes that you will be activating the script while "within" that very directory.
The code, IMHO, should read:
Code:
...
[PATH TO SDK/TOOLS/]adb devices
...
And the OS X user should be instructed to insert their own path.
Click to expand...
Click to collapse
WRONG the code running in the shell is to continuously run adb devices... which to do so correctly would have to be implemented with ./ in front to run correctly on a mac... dont try to correct what is right i will school u
and seeing as he clearly instructs u to place those apps within the tools folder and "cd" to it... means that the user should have those commands ready at hand which is included in the folder...
shadowleo85 said:
this is wrong
#!/bin/bash
while [ 1 ]
do
adb devices
done
it should be
#!/bin/bash
while [ 1 ]
do
./adb devices
done
Click to expand...
Click to collapse
Ur right.. that is the right way..
also for those of u having problems with the loop step where it never sticks... try a different memory card... i was having problems with the stock card... so i tried a different card and it worked perfectly... with no problems
shadowleo85 said:
and seeing as he clearly instructs u to place those apps within the tools folder and "cd" to it... means that the user should have those commands ready at hand which is included in the folder...
Click to expand...
Click to collapse
LOL. Okay, tough guy.
The fact is that the active directory in your terminal is irrelevant to the actual rooting process. If you want to argue about it, have at it. I really don't care.
Yes, in terminal you must type ./adb devices, but within the .sh you can just issue adb devices and it works just fine. It is because you are issuing a command from within a script and OS X understands you better when you use them.
As for the memory card trick everyone is perpetuating, tis but a superstition and whatever floats your boat, while you attempt to get adb to stick. When I rooted mine, it took five to ten tries. Rooting my girlfriend's, on the other hand, took nearly 15-20 min for it to catch.
sk8rbebop said:
Yes, in terminal you must type ./adb devices, but within the .sh you can just issue adb devices and it works just fine. It is because you are issuing a command from within a script and OS X understands you better when you use them.
As for the memory card trick everyone is perpetuating, tis but a superstition and whatever floats your boat, while you attempt to get adb to stick. When I rooted mine, it took five to ten tries. Rooting my girlfriend's, on the other hand, took nearly 15-20 min for it to catch.
Click to expand...
Click to collapse
within the shell command command it has to be ./adb devices or it fails at command line 4 which is the problem i was having until i changed it in the shell and it worked... along with a few others...
and as far as the memory card thats the issue... i tried 5 different memory cards one always worked the others never stuck... it may have something to do with the way the memory card is coded... my 16gb mem card out my hd2 is the only one that worked... not really a superstition
shadowleo85 said:
within the shell command command it has to be ./adb devices or it fails at command line 4 which is the problem i was having until i changed it in the shell and it worked... along with a few others...
and as far as the memory card thats the issue... i tried 5 different memory cards one always worked the others never stuck... it may have something to do with the way the memory card is coded... my 16gb mem card out my hd2 is the only one that worked... not really a superstition
Click to expand...
Click to collapse
The memory card has nothing to do with the rooting process whatsoever. With that said, a lot of the memory cards shipping with the slides are misformated. The first thing I did was backup my card, swap it out with a class 10 16 GB card and set up a 1GB ext4 partition. Then I copied the files back to the FAT partition and all was well.
HebrewToYou said:
The memory card has nothing to do with the rooting process whatsoever. With that said, a lot of the memory cards shipping with the slides are misformated. The first thing I did was backup my card, swap it out with a class 10 16 GB card and set up a 1GB ext4 partition. Then I copied the files back to the FAT partition and all was well.
Click to expand...
Click to collapse
yet with all the cards i tested which are formatted correctly and running perfectly on all my devices... and even tried useing my class 6 8gig with is partitioned for my og mytouch didnt work... dude stop trying to correct me i got this... worry bout ya own lil world
shadowleo85 said:
yet with all the cards i tested which are formatted correctly and running perfectly on all my devices... and even tried useing my class 6 8gig with is partitioned for my og mytouch didnt work... dude stop trying to correct me i got this... worry bout ya own lil world
Click to expand...
Click to collapse
Oy vey. Seriously? The rooting process is a hit or miss operation. Your sdcard doesn't even come into play for a second. You could probably remove the darn thing and be successful.
Please, for heaven's sake, just listen to sk8rbebop, myself or any of the numerous other people saying in no uncertain terms that the sdcard issue is a myth. Don't perpetuate something that is entirely unrooted in reality.
Sheesh...
HebrewToYou said:
Oy vey. Seriously? The rooting process is a hit or miss operation. Your sdcard doesn't even come into play for a second. You could probably remove the darn thing and be successful.
Please, for heaven's sake, just listen to sk8rbebop, myself or any of the numerous other people saying in no uncertain terms that the sdcard issue is a myth. Don't perpetuate something that is entirely unrooted in reality.
Sheesh...
Click to expand...
Click to collapse
how can it be unrooted in reality when in reality it works and im proving that... its mighty funny that it doesnt stick unless this specific memory card is in my device... and u stating that it doesnt come into play is wrong... when u load ur phone into bootloader it does check ur "memory card" for an nbh image which is where i believe the problem lies... it accesses ur memory card just like the og mytouch did to locate a gold card... dont argue with me when it is just another work around that just may work seeing as IM PROVING THAT IT DOES INDEED WORK
shadowleo85 said:
how can it be unrooted in reality when in reality it works and im proving that... its mighty funny that it doesnt stick unless this specific memory card is in my device... and u stating that it doesnt come into play is wrong... when u load ur phone into bootloader it does check ur "memory card" for an nbh image which is where i believe the problem lies... it accesses ur memory card just like the og mytouch did to locate a gold card... dont argue with me when it is just another work around that just may work seeing as IM PROVING THAT IT DOES INDEED WORK
Click to expand...
Click to collapse
Oy vey. Fine, believe what you want. What's *actually* helping you root the device is sticking gum on your nose, turning your baseball cap backwards, rubbing your lucky rabbit foot and reciting the pledge of allegiance. You just haven't realized it yet.
Stay crunchy.
HebrewToYou said:
Oy vey. Fine, believe what you want. What's *actually* helping you root the device is sticking gum on your nose, turning your baseball cap backwards, rubbing your lucky rabbit foot and reciting the pledge of allegiance. You just haven't realized it yet.
Stay crunchy.
Click to expand...
Click to collapse
dude wtf is ur problem... if it can possibly help someone whose having the issue y r u having such an issue with it

[Q] [ Backtrack 5 on LGP500 ]

Ive seen that the Backtrack 5 can be installed on xperia x10..
here's the link
Does it work on LGP500 too?
It would be great if this would work on our phone to give some special features..
up please answer my question.
rexon2011 said:
up please answer my question.
Click to expand...
Click to collapse
Hmmm? Well, go and try it?
I tried... at first i thought it should work. As the file system and all are similar
It worked till the 'startbt' but when i entered 'bt' it said segmentation fault
So anyone can tell me please what i have done wrong ( I know the wrong thing is its not meant for Optimus but anything other than that?? ) or tell me how to make it work
Thank you
PS --> My First post on XDA
Ohk looks like something is missing.
do following
reboot your phone do startbt as usual...
after that us
http://forum.xda-developers.com/showpost.php?p=14006091&postcount=15
this script copy script to any location and run it.
sh debug.sh
output will be in /data/local/debug_log.txt
just copy paste the whole file here.
tips you can push the debug.sh file using adb push.
and simmilarly pull the log out using adb pull.
once you are done then post the debug log that can help in diagnostics.
anantshri said:
Ohk looks like something is missing.
do following
reboot your phone do startbt as usual...
after that us
http://forum.xda-developers.com/showpost.php?p=14006091&postcount=15
this script copy script to any location and run it.
sh debug.sh
output will be in /data/local/debug_log.txt
just copy paste the whole file here.
tips you can push the debug.sh file using adb push.
and simmilarly pull the log out using adb pull.
once you are done then post the debug log that can help in diagnostics.
Click to expand...
Click to collapse
http://www.mediafire.com/?x4kuvorawo4reqr
is this the debug log u wer asking??
please do something... i am too much exited to try it on my optimus
BTW add me on FB i have sent u a friend request
cooltoad92 said:
http://www.mediafire.com/?x4kuvorawo4reqr
is this the debug log u wer asking??
please do something... i am too much exited to try it on my optimus
BTW add me on FB i have sent u a friend request
Click to expand...
Click to collapse
two things.
1) reboot your phone and do startbt and bt again.
post all output here.
2) also segmentation fault could be coz of the busybox chrooting failure.
i hve busybox version 1.15.3
anantshri said:
Ohk looks like something is missing.
do following
reboot your phone do startbt as usual...
after that us
http://forum.xda-developers.com/showpost.php?p=14006091&postcount=15
this script copy script to any location and run it.
sh debug.sh
output will be in /data/local/debug_log.txt
just copy paste the whole file here.
tips you can push the debug.sh file using adb push.
and simmilarly pull the log out using adb pull.
once you are done then post the debug log that can help in diagnostics.
Click to expand...
Click to collapse
When i try to run BackTrack 5 on my P500 Optimus One with Gingerbread 2.3 and root installed, i get this error:
mkdir failed for data/local/mnt, File exists
net.ipv4.ip_forward = 1
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
Segmentation fault
Shutting down BackTrack ARM
losetup: /dev/loop7: Device or resource busy
Here mine debug.sh.txt: http://www.megaupload.com/?d=2SE35OPZ
Can anyone help me?
You really need a bigger screen size to get this working properly.

[BOUNTY] How to restore all? Last hope :/

Original message> Hi guys,
does anybody knows how to restore folio and take it back to life?
My son played with my tablet and he messed something.
Now I have bricked tablet, black screen, no toshiba logo after turn on, nothing just green led :/
Only thing working is when I connect usb cable to pc, It connect as ATX.
I found some threads but they are so complicated
Can somebody help me and write for me restoration guide for dummies?
Edit: Does anybody have full dumps? I need bootloader, bct for start.
EDIT> I will pay 30 EUR to Who will help me to restore my dead tablet.
I need all dumps, bootloader, bct and short batch file for nvflash.
On what partition is bootloader? I can dump it but I don't know on what partition it is and I know a very little about nvflash.
Jon2555 said:
On what partition is bootloader? I can dump it but I don't know on what partition it is and I know a very little about nvflash.
Click to expand...
Click to collapse
I think bootloader is in ../prebuilt/bootloader.bin
I found good restore guide:
Backing Up
Download the latest Linux For Tegra (L4T) package from here and unzip it
Open a terminal and change to the following directory: linux4tegra/nvflash
the following command sends the vanilla bootloader into your device RAM (it will not overwrite anything)
# LD_LIBRARY_PATH=. ./nvflash --bl ../prebuilt/fastboot.stock.bin --go
the following command saves your disk partitioning (very important!)
# LD_LIBRARY_PATH=. ./nvflash -r --getpartitiontable partitiontable.txt
use the following command with to save the partitions one by one to your harddisk (see Partition Layout for details)
# for i in $(seq 2 14); do LD_LIBRARY_PATH=. ./nvflash -r --read $i part-$i.img; done
You should endup with part-2.img, part-3.img [...] up to part-14.img, and partitiontable.txt.
Keep them in a safe place if you intend to play a bit with your AC100.
Restoring
In the partitiontable.txt, you should see following pattern (you need the highlighted values for each partition you want to restore):
PartitionId=[PartitionId]
Name=...
DeviceId=18
StartSector=[StartSector]
NumSectors=[NumSectors]
BytesPerSector=2048
Open a terminal and change to the following directory: linux4tegra/nvflash
Reload the vanilla bootloader using the following command:
# LD_LIBRARY_PATH=. ./nvflash --bl fastboot.bin --go
For earch part-[PartitionId].img you want to restore, execute the following command:
# LD_LIBRARY_PATH=. ./nvflash -r --rawdevicewrite [StartSector] [NumSectors] part-[PartitionId].img
Reboot your device.
Do you manage to get folio to life?
cmjm said:
Do you manage to get folio to life?
Click to expand...
Click to collapse
not yet because I don`t have correct dumps and bootloader :/ so I am waiting for someone who dump me this and prepare script for nvflash.
I heared that bootloader.bin is in .../prebuilt but where is it???
Sent from my IDEOS S7 Slim using XDA App
ok, thank you.
Let's see if someone can do that for us.
you have installed the drivers apx.
Someone to help us.
I want and I asked where is the bootloder???
Sent from my Xoom using Tapatalk
In my I can no longer view, I'll try to search the web.
I can not find it. funny find several people who says that had solved the problem but no one is able to help.
yeah, I am also curious where is bootloader. There are two ways where can it be:
in partition 0 or 1 or somewhere in file tree. I don`t know :/
btw I have RMA this tablet and will get new from them. After that I could try to dump it.
this is good news.
I've tried everything and still nothing.
Gives news when you can.
I searched a bit in android git and find that prebuilt is in source code that Toshiba didn't release, only kernel... Only hope is dumping.
Sent from my IDEOS S7 Slim using XDA App
Any news??
cmjm said:
Any news??
Click to expand...
Click to collapse
finally I`ve give up. After RMA I received for small repay toshiba thrive so I don`t need dump anymore.
Thank you guys for all.
Is there a Solution?
How much do you have to pay?
I sent it to Toshiba and they have repair it for free.
Sent from my Desire HD using XDA App

[Q] Sony Tablet ICS 4.0.3 - bricked it

Hello,
I followed the instructions
in http://forum.xda-developers.com/showthread.php?t=1886310
to root my tablet.
I do it using Linux so I don't use the half automatic way.
I signed also the VpnFaker.apk
But it does not work, I got the error at the end, sometimes mentioned:
:~/Infos/android/SonyTabletICS4.03Root> adb shell am start -n com.android.vpndialogs/.Term
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does not exist.
I tried the same procedure again - no success and all my apps are gone.
Ok I thought - I do it back.
I copied the old system- and old app- back to system and app.
And that was it ...
The device does not start. It shows sony and after that the yellow to golden
animation which normally ends sometimes.
It does not end.
I can connect via adb on linux not on windows (I use it very rarely and the win 7 notebook
allowas says that the driver is not installed correctly )
I can't get the right to manipulate /data
using the while loop. I think I can't confirm the restore with the touchscreen.
I post this also in the thread http://forum.xda-developers.com/showthread.php?t=1886310
I don't know what to do now.
Greetings
Karsten
I think we have the same issue, in my case I can't fix it until Sony release a new update.
Can you post your recovery log?
Sent from my MB525 using xda app-developers app
karo said:
Hello,
I followed the instructions
in http://forum.xda-developers.com/showthread.php?t=1886310
to root my tablet.
I do it using Linux so I don't use the half automatic way.
I signed also the VpnFaker.apk
But it does not work, I got the error at the end, sometimes mentioned:
:~/Infos/android/SonyTabletICS4.03Root> adb shell am start -n com.android.vpndialogs/.Term
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does not exist.
I tried the same procedure again - no success and all my apps are gone.
Ok I thought - I do it back.
I copied the old system- and old app- back to system and app.
And that was it ...
The device does not start. It shows sony and after that the yellow to golden
animation which normally ends sometimes.
It does not end.
I can connect via adb on linux not on windows (I use it very rarely and the win 7 notebook
allowas says that the driver is not installed correctly )
I can't get the right to manipulate /data
using the while loop. I think I can't confirm the restore with the touchscreen.
I post this also in the thread http://forum.xda-developers.com/showthread.php?t=1886310
I don't know what to do now.
Greetings
Karsten
Click to expand...
Click to collapse
Factory RESET from recovery
I don't think so. if the problem is on /system directory, factory reset will not help.
Sent from my MB525 using xda app-developers app
_kyo_ said:
I don't think so. if the problem is on /system directory, factory reset will not help.
Sent from my MB525 using xda app-developers app
Click to expand...
Click to collapse
I had to do factory reset when I was trying to root and it worked for me. I know your problem is worse unfortunately
Just thought it was worth a try in this case
of course it worth a try
Sent from my MB525 using xda app-developers app
adb logcat of bricked device
Hello,
the log get by adb logcat repeats after some time, so here
is only one part.
Since yesterday I try in /data/system - yes I could read it don't have permissions on app:
/data/local/tmp/busybox find . -type d -exec chmod 755 {} \;
/data/local/tmp/busybox find . -type f -exec chmod 644 {} \;
ups the log is to long you can find it under
zb42.de/logcat-2012-09-23-v2.txt using your browser
(sorry I'm not allowed to post a link to an external site)
there are three lines which shows where the logs repeat :
--------------------------------------------------
and from here it seems to repeat
-------------------------------------------------
hmm, now I have done a
/data/local/tmp/busybox find . -type d -exec chmod 777 {} \;
and the system starts but all applications vanished.
Puh, but it seems I'm back to the system.
Log shows still many errors, there is no app available,
Apps are shown on the Screen, but if I tap it
then it says: "App ist nicht installiert" (application is not installed)
I think my fault was that I copied back the system- directory so I have
destroyed the correct permissions on the file-system.
Can anybody give me a hint, how I should go further.
First goal would be a working system, second goal is
rooting
My goal of rooting was:
- curiousity (right word? Neugier in German) I've done it with Android 3
- correct the sdcard problem
update - device is rooted, I needed to start from factory defaults - then it works
Thanks
Karsten
dont think /system - I never touched it
no longer important, I can't delete this

How To Guide Unlocking, Rooting, System RW, LED Notification Summary

First time posting and I wanted to say thank you to all the excellent talent here on XDA! None of this would have been done without the work of so many people.
I have a Moto G Play (2021) (XT2093-4) that I recently purchased (Best Buy - $159 US/Carrier Unlocked) and I wanted to document my adventure in to rooting, making '/system' RW, and fixing the missing LED notification light (hint: I used the charging light) (hint^2: It's not required to make '/system' RW in order to fix the LED notification light - I just wanted more control over my phone).
First, "OEM unlocking" was greyed out for me, but became available after several days of having the phone online with a SIM card.
I followed the instructions here to unlock the bootloader and root with Magisk (Non-TWRP). Along with these instructions.
Once bootloader is unlocked, you will need the 'boot.img' file from your stock firmware. I used the "Rescue and Smart Assistant" utility to grab a copy of the stock firmware (GUAMNA_RETAIL_QZAS30.Q4_39_35_9_subsidy_DEFAULT_regulatory_DEFAULT_CFC.xml) and extracted the "boot.img" file for the next steps.
Continue installing Magisk (Filenames may be different! Don't just copy and paste.):
Code:
adb install Magisk-v23.0.apk
adb push boot.img /sdcard/Download
(Follow the instruction on your phone to patch 'boot.img' in Magisk)
adb pull /sdcard/Download/magisk_patched-23000_aKKMt.img
adb reboot bootloader
fastboot flash boot_a magisk_patched-23000_aKKMt.img
fastboot flash boot_b magisk_patched-23000_aKKMt.img
You should now have a working, rooted Moto G Play. You can just stop here and have fun with your phone, but I noticed that even with root, the system partition was not RW.
I followed these instructions to make '/system' writable (Note: you will need the 'sysrw_repair.zip' that's included in the bundle and a Linux system):
Code:
adb push systemrw_1.32_flashable.zip /data/local/tmp/
adb shell
su
cd /data/local/tmp/
unzip systemrw_1.32_flashable.zip
cd systemrw_1.32/
chmod +x systemrw.sh
./systemrw.sh in=`ls -l /dev/block/by-name/super | awk '{print $NF}'` out=/data/local/tmp/systemrw_1.32/img/super_original.bin size=50
The phone doesn't have enough space to complete 'lpmake' on the device and will end with an "Error 73" code. Running the "sysrw_repair_v1.32" tool on a Linux machine was a workaround because it pulls the '*.img" files to your local machine then combines them in to a single '.bin' file. But, before I did that, and because it's really annoying, I made some room to stop the phone from complaining about a lack of space:
(Still on the phone's adb)
Code:
rm ./img/super_original.bin
Now, on the Linux machine, I unzipped 'sysrw_repair_v1.32_proper.zip' then commented out line 39 (where it calls the "flash()" function) of the script (sysrw_repair.sh) because I wanted to flash the "super" partition myself.
(On another Linux terminal)
Code:
cd /path/to/unzipped/sysrw_repair/dir/
chmod +x sysrw_repair.sh
./sysrw_repair.sh
This results in a new folder (img) with a rather large bin file (super_original.bin).
(Back on the phone adb)
Code:
exit # Exit root
exit # Exit adb
adb reboot bootloader
Now it's time to flash the fixed bin file to the "super" partition:
Code:
cd /path/to/unzipped/sysrw_repair/dir/
fastboot flash super ./img/super_original.bin
fastboot reboot
You should be able to login and have a writable '/system':
Code:
adb shell
su
mount -o rw,remount /
No errors should appear.
Last, I like having an LED indicator that tells me that I have an SMS/MMS notification waiting. Motorola thought it would be wise to eliminate that feature altogether instead of having the option to enable it. So, I forced it back on using a startup script that dumps the notifications and greps for some key words. And, if it finds something, it "breaths" the charging LED. The script loops until the notification is gone, then keeps checking for new notifications every 30 seconds. (Note: the "/data/adb/service.d/" directory is used by Magisk like an INIT service):
(Still root on the phones adb)
Code:
cd /data/adb/service.d/
cat <<EOF > ledfix.sh
#!/bin/sh
while true; do
if dumpsys notification | egrep NotificationRecord | egrep sms > /dev/null
then
if [[ $(cat /sys/class/leds/charging/breath) == 0 ]]
then
echo 1 > /sys/class/leds/charging/breath
sleep 2
continue
else
sleep 2
continue
fi
elif egrep 'Charging' /sys/class/power_supply/battery/status > /dev/null
then
if [[ $(cat /sys/class/leds/charging/breath) -ne 0 && $(cat /sys/class/leds/charging/brightness) -ne 0 ]]
then
echo 0 > /sys/class/leds/charging/breath
echo 255 > /sys/class/leds/charging/brightness
elif [[ $(cat /sys/class/leds/charging/breath) == 0 && $(cat /sys/class/leds/charging/brightness) == 0 ]]
then
echo 255 > /sys/class/leds/charging/brightness
else
continue
fi
else
echo 0 > /sys/class/leds/charging/breath
echo 0 > /sys/class/leds/charging/brightness
fi
sleep 30
done
EOF
chown 0.0 ledfix.sh
chmod 0755 ledfix.sh
reboot
Now, the charging light will fade off and on about every 2 seconds if there's an SMS/MMS notification waiting. And will check for notifications every 30 seconds. I'm sure someone can come up with a better way of doing this, but this was a nice quick-and-dirty way to get what I wanted.
Hope this helps!
I created an account to say thank you for this, I have already done a good portion, having unlocked the bootloader, the problem is the Rescue Smart Assistant, it won't let me log in, it keeps telling me it can't connect, and the GUI is different because of an update, there is no download button inside the program, only a greyed out rescue button. How did you manage to make the backup Boot.img? Maybe you are using a different OS, and/or version of the program (Not the app, that is already auto-installed), I'm using Windows 10, are you on Linux? I might just need to try from Linux, maybe in a VM.
I was trying to do this before I found this post, and have already installed ADB, the SDK, fastboot, and Motorola Drivers, I just need a way to get the Boot.img, and to patch it, also figure out how to flash it. The last android I rooted with a custom rom was the HTC EVO 4G with Oreo/Jellybean, so I'm a little rusty, but am able to understand technical jargon.
If anyone could help, that would be awesome. I've reinstalled different versions of Rescue Smart Assistant as well, they always upgrade on boot, same problem. I've added exceptions to my firewall and everything.
UPDATE: Was about to post this when I had updated from android 10 to 11 and decided to try logging in again a little closer to my router, to see if the connection was timing out, I think that was the cause, as I can now sign in, and the GUI seems correct from the first appearance. I don't see why I should have any trouble following the rest of the guide, but feel I should share my trials and frustrations anyways, for anyone else experiencing the same,
Thanks again.
PROFSLM said:
I created an account to say thank you for this, I have already done a good portion, having unlocked the bootloader, the problem is the Rescue Smart Assistant, it won't let me log in, it keeps telling me it can't connect, and the GUI is different because of an update, there is no download button inside the program, only a greyed out rescue button. How did you manage to make the backup Boot.img? Maybe you are using a different OS, and/or version of the program (Not the app, that is already auto-installed), I'm using Windows 10, are you on Linux? I might just need to try from Linux, maybe in a VM.
I was trying to do this before I found this post, and have already installed ADB, the SDK, fastboot, and Motorola Drivers, I just need a way to get the Boot.img, and to patch it, also figure out how to flash it. The last android I rooted with a custom rom was the HTC EVO 4G with Oreo/Jellybean, so I'm a little rusty, but am able to understand technical jargon.
If anyone could help, that would be awesome. I've reinstalled different versions of Rescue Smart Assistant as well, they always upgrade on boot, same problem. I've added exceptions to my firewall and everything.
UPDATE: Was about to post this when I had updated from android 10 to 11 and decided to try logging in again a little closer to my router, to see if the connection was timing out, I think that was the cause, as I can now sign in, and the GUI seems correct from the first appearance. I don't see why I should have any trouble following the rest of the guide, but feel I should share my trials and frustrations anyways, for anyone else experiencing the same,
Thanks again.
Click to expand...
Click to collapse
You can also get the firmware from
Lolinet Mirrors
https://t.me/MotoUpdatesTracker
Search for Firmware by codename, software channel, Software Version, and build #
So I wasn't going crazy when I could swear a LED notification light in the upper right side above the screen blinked once whenever I rebooted the phone?
Why would Motorola include such a thing and not utilize it for more than merely a boot up indicator? Like I dont even get to see it come on while charging, it literally only blinks once during boot and that's it.
mario0318 said:
So I wasn't going crazy when I could swear a LED notification light in the upper right side above the screen blinked once whenever I rebooted the phone?
Why would Motorola include such a thing and not utilize it for more than merely a boot up indicator? Like I dont even get to see it come on while charging, it literally only blinks once during boot and that's it.
Click to expand...
Click to collapse
I know!
I don't know what triggers that light to come on. I even waited until the battery was at 6% and the light still never came on.
So, I updated the script above to make the light go full brightness if the battery is charging. The order matters, so if a notification comes in while charging, it'll "breath" the LED. Also, if the battery is full, then the light will turn off. Kind of telling you that it's time to unplug.
I followed these steps and my touch screen stopped working. I had previously installed twrp already on it while trying to learn how to root it, and when i boot into fastboot it goed through twrp, i also used the boot.img file from lolinet, not sure which of these caused the issue. Interestingly though, the touch screen does work whilst in twrp. any suggestions on how to fix or what would be causing it? Phone does work with usb mouse over OTG
jorduino said:
I followed these steps and my touch screen stopped working. I had previously installed twrp already on it while trying to learn how to root it, and when i boot into fastboot it goed through twrp, i also used the boot.img file from lolinet, not sure which of these caused the issue. Interestingly though, the touch screen does work whilst in twrp. any suggestions on how to fix or what would be causing it? Phone does work with usb mouse over OTG
Click to expand...
Click to collapse
Are you absolutely sure you used the correct boot.img from an image version exactly matching your phone variant version?
mario0318 said:
Are you absolutely sure you used the correct boot.img from an image version exactly matching your phone variant version?
Click to expand...
Click to collapse
Im not completely sure how to get the right file, but I think the first time it was the wrong one, but then when i got what i thought was the right one, it just didn't work at all and I had to recovery flash it. I had just updated so maybe the correct image wasn't available yet. Im going to try again though
Oh! Hello @latentspork. Thanks for your interest in my SystemRW project. I just came across this thread randomly...
I'm happy you got my script to work on your Motorola device by using the included sysrw_repair script
Please feel free to send me your log files from script folder. Thanks. It's useful for further development of the script
latentspork said:
The phone doesn't have enough space to complete 'lpmake' on the device and will end with an "Error 73" code. Running the "sysrw_repair_v1.32" tool on a Linux machine was a workaround because it pulls the '*.img" files to your local machine then combines them in to a single '.bin' file. But, before I did that, and because it's really annoying, I made some room to stop the phone from complaining about a lack of space:
Click to expand...
Click to collapse
That's not 100% accurate. Lpmake error 73 means CAN'T_CREATE and has nothing to do with error 70 (insufficient space).
To this day I still don't know exactly what causes error 73 on some devices (mostly Motorola and others) but it looks like some kind of kernel panic. If anyone knows how to avoid this error 73 in Android please let me know! Thanks!
Yes that's true the included sysrw_repair script (Linux only) pulls the image files from the phone to your computer and attempts to run the same lpmake command with the same arguments that just failed with error 73 on the phone itself and now all of a sudden it just works in Linux. Go figure.
latentspork said:
(Still on the phone's adb)
Code:
rm ./img/super_original.bin
Click to expand...
Click to collapse
Why would you delete the super_original.bin ? That's your stock read-only super image which by default is automatically dumped by script for backup purposes in case you ever get a bootloop.
And if you launch the script by specifying a custom input value (in=x) like in your example above then you won't even have a super_original.bin file to begin with because script will skip the whole dumping of original super image process.
latentspork said:
This results in a new folder (img) with a rather large bin file (super_original.bin).
Click to expand...
Click to collapse
I think you mean super_fixed.bin
latentspork said:
Now it's time to flash the fixed bin file to the "super" partition:
Code:
cd /path/to/unzipped/sysrw_repair/dir/
fastboot flash super ./img/super_original.bin
fastboot reboot
Click to expand...
Click to collapse
Here in your instructions you are manually flashing the wrong file. Shouldn't you be flashing super_fixed.bin to your super partition?
Usually I only flash the super_original.bin to get back out of a bootloop...
latentspork said:
Now, on the Linux machine, I unzipped 'sysrw_repair_v1.32_proper.zip' then commented out line 39 (where it calls the "flash()" function) of the script (sysrw_repair.sh) because I wanted to flash the "super" partition myself.
Click to expand...
Click to collapse
See that's why I included that automatic flash() function in the repair script. Then you don't have to worry about manually flashing the wrong file to your super partition
Enjoy a fully read/write-able device!
Great news! New SystemRW version coming soon! ​
@lebigmac
I really appreciate the reply and the tool! It did work really well on my model (XT2093-4).
That's not 100% accurate. Lpmake error 73 means CAN'T_CREATE and has nothing to do with error 70 (insufficient space).
To this day I still don't know exactly what causes error 73 on some devices (mostly Motorola and others) but it looks like some kind of kernel panic. If anyone knows how to avoid this error 73 in Android please let me know! Thanks!
Click to expand...
Click to collapse
I only assumed that "Error 73" was caused by insufficient space, because the phone really did run out of space. I noticed that the phone was out of space because I got a home screen notification warning, asking me to free up space. I confirmed it with a "df -h" at the shell. Apparently, the OS takes up almost 15GB. When you add the ".img" files, there's only about 5GB left. There wasn't enough room to complete the ".bin" file. Maybe I could have used an SD card or something.
You're probably correct in that "Error 70" is the correct error for that, but on my phone, I never saw that error. I did notice that the tool was still trying to write data as the phone ran out of space, then it would throw the "Error 73". Maybe it didn't register the lack of space, or just an oddity with my model? No idea.
Why would you delete the super_original.bin ?
Click to expand...
Click to collapse
This is the file that was created when I initially ran the "./systemrw.sh" command on the phone. The result of running the command on the phone were several ".img" files and a very large "super_original.bin", but it was incomplete because the command threw an "Error 73". I was following your instructions, and I noticed that the output name of the file was "original" instead of "fixed". I probably could of outputted it to a new name to reduce confusion, but I didn't really care too much about the name as long as I had a working file.
I think you mean super_fixed.bin
...
Shouldn't you be flashing super_fixed.bin...
Click to expand...
Click to collapse
Normally, yes. But the Linux script also outputted the filename "super_original.bin". Again, as long as it worked, I was okay with it. The commands I used above were the exact commands that I ran at the time. I copied them from the terminal consoles I was using. So I don't know why it wasn't outputting the correct filename (again, I was following your instructions and was a little confused that the names came out differently - I just figured I was doing something wrong like not use the proper output command or something).
Then you don't have to worry about manually flashing the wrong file to your super partition...
Click to expand...
Click to collapse
I was really just being cautious because my previous phone broke and I didn't have a fallback.
But, at no point were there two bin files (original and fixed), so there wasn't much confusion. Where I originally had just ".img" files before running the script, I now had a single ".bin" file. I knew that was the file I needed.
But again, thank you for all the hard work on this tool! I was reading that it's worked on lots of different model phones, and it's always good to see the open source community doing things that help all kinds of people.
For moto notification for this phone at least use https://play.google.com/store/apps/details?id=br.com.itsmeton.motoledreborn or moto led reborn from the play store it just works
Hi, sorry. This can be removed. I put it in place because I was having issues with the xda app. For whatever reason, every time I tried to share this particular post, it would share a link for the post which I used originally, rather than the current post. I knew that if I commented I could get back here easily on my PC.
So what is the place holder for

Categories

Resources