[TOOLKIT] Nexus 7 rooting tool for Linux [Updated 09/17/12] - Nexus 7 Android Development

WARNING THIS IS A VERY EARLY VERSION AND MAY CONTAIN A LOT OF BUGS. USE AT YOUR OWN RISK
This is my attempt at making a one-click Nexus 7 rooting tool for Linux; it is written in Python with PyQt4
Features:
-Root/Unroot your device
-Permanently flash CWM recovery (touch or standard version)
-Permanently flash TWRP
-Unlock/Lock the bootloader
-Flash an img file to a selected partition
-Reboot the device into recovery or bootloader mode
-Launch an adb shell
-Backup/Restore your apps and shared data (not paid apps)
-Flash a CWM zip
-More to come
Initial setup:
You must add a udev rule to run this tool as a non-root user
To do that on Ubuntu:
-Hit Alt+F2 and type:
gksu gedit /etc/udev/rules.d/51-android.rules
-Copy/paste the following:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
-Save the file
-And reboot
Alternatively, you can use the included script, setup_udev.sh
You must enable USB debugging on your tablet for this tool to work:
-Go to Settings>Developer options, and check "USB debugging"
Dependencies:
-Python 2.x
-PyQt4
On Ubuntu you can install them like this:
Code:
sudo apt-get install python2.7 python-qt4
* The standalone versions do not have any dependencies
64-Bit users:
You will need to install 32-Bit compatibility libs for adb and fastboot:
Code:
sudo apt-get install ia32-libs
Rooting instructions:
* Right-click n7root.py and choose Properties, go to the Permissions tab and make sure that Allow executing this file as a program is checked (it should be already, but it doesn't hurt to check)
* Now you can start the program by double-clicking n7root.py
* Before Unlocking your device you should click the Backup button to backup your data.
* Before rooting you must unlock the device; do that by clicking the Unlock button
* After unlocking you can restore your data by clicking the Restore button
* Now click the Root button to root the device
* (Optional) If you want to use a custom recovery, select your recovery and click the Install recovery button
Downloads:
Version 4
Standalone executable for Ubuntu 12.04
- Added CWM zip flasher
- Code is now cross-platform and should work on Windows and Mac OS X (untested)
* Mac users will need to download the Mac adb/fastboot binaries and place them in the tools folder renamed to adb.mac and fastboot.mac; they will also need to install Python 2.x and PyQt4
* I made an experimental standalone executable for Windows, but was unable to properly test it because I couldn't get the USB drivers working on Windows 8 x64. It does not currently handle USB driver installation like other toolkits, so you'll have to do that manually.
md5: b53f1d487256b56b25bae74c35f82a91
Ubuntu executable: ebe4249c0855c5a26b7d896e68550d9a
Windows executable: 3d4fe0e419eb7c8fc6d17eef6d66c0b8
Live CD:
This is a bootable Linux live CD based on Knoppix that includes the toolkit and not much else. It can be used on any computer without installing anything; just burn the iso to a CD with Imgburn or write it to a USB drive with Suse Image Writer and boot from it.
Live CD v4
md5: c3a031762437024667e4a7331992238e
Screenshots:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Big thanks to:
* ChainsDD for Superuser
http://androidsu.com
* Koush for CWM
http://www.clockworkmod.com
* Team Win for TWRP
http://teamw.in/project/twrp2
* And Google

stop using toolkits and stop posting toolkits. they are not needed on any nexus device. all you are doing is introducing more problems http://forum.xda-developers.com/showthread.php?t=1815020

simms22 said:
stop using toolkits and stop posting toolkits. they are not needed on any nexus device. all you are doing is introducing more problems http://forum.xda-developers.com/showthread.php?t=1815020
Click to expand...
Click to collapse
This is truth.

I made this because I saw some requests for a Linux version of Wug's toolkit.
If it's completely useless and Linux users prefer to just do it manualy, that's okay.
At least I learned a bit about GUI programming in python while making it.

steevp said:
I made this because I saw some requests for a Linux version of Wug's toolkit.
If it's completely useless and Linux users prefer to just do it manually, that's okay.
At least I learned a bit about GUI programming in python while making it.
Click to expand...
Click to collapse
learning is always good.

No bugs for me on latest version of Ubuntu!
Sucessful root and CWM install, I didn't use it to unlock though

steevp said:
I made this because I saw some requests for a Linux version of Wug's toolkit.
If it's completely useless and Linux users prefer to just do it manualy, that's okay.
At least I learned a bit about GUI programming in python while making it.
Click to expand...
Click to collapse
I like toolkits and I'm a linux user mostly.
Thanks for this.
Sent from my HTC Evo Shift using xda app-developers app

I am using linux cause with windows 8 I can't do anything and this tool is really useful as I am new to the linux ecosystem.
Everything worked smoothly.
Good work and thanks

Please don't stop developing the toolkit. Some people don't like them, but some people do.

ferossan said:
Please don't stop developing the toolkit. Some people don't like them, but some people do.
Click to expand...
Click to collapse
Since people are using it I will continue to improve it.
Currently working on giving more detailed error messages, so that the user isn't left completely clueless if something goes wrong.

Could be possible to improve this tool adding the "Team Win for Open Recovery" (TWRP) as one option as well?
Also, as long I understand, the tool is using "Superuser", is it better than "SuperSU"?

ferossan said:
Could be possible to improve this tool adding the "Team Win for Open Recovery" (TWRP) as one option as well?
Also, as long I understand, the tool is using "Superuser", is it better than "SuperSU"?
Click to expand...
Click to collapse
Yes, I will add an option for TWRP.
I have not used SuperSu yet, I will check it out.
Sent from my Nexus 7 using Tapatalk 2

Ubuntu/nexus 7
Hi!
I'm a Ubuntu user since 8.04...This looks like what I need.
Do you have any more info/success?
Thanks!
MegaKegHead
steevp said:
WARNING THIS IS A VERY EARLY VERSION AND MAY CONTAIN A LOT OF BUGS. USE AT YOUR OWN RISK
This is my attempt at making a one-click Nexus 7 rooting tool for Linux.
The GUI is written in Python with PyQt4 and the actual rooting is done with shell scripts.
Features:
-Root/Unroot your device
-Permanently flash CWM recovery (touch or normal version)
-Unlock/Lock the bootloader
-Flash an img file to a selected partition
-Reboot the device into recovery or bootloader mode
-Launch an adb shell
-More to come
Initial setup:
You must add a udev rule to run this tool as a non-root user
To do that on Ubuntu:
-Hit Alt+F2 and type:
gksu gedit /etc/udev/rules.d/51-android.rules
-Copy/paste the following:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
-Save the file
-And reboot
You must enable USB debugging on your tablet for this tool to work:
-Go to Settings>Developer options, and check "USB debugging"
Dependencies:
-Python 2.x
-PyQt4
On Ubuntu you can install them like this:
Code:
sudo apt-get install python2.7 python-qt4
64-Bit users:
You will need to install 32-Bit compatibility libs for adb and fastboot:
Code:
sudo apt-get install ia32-libs
Downloads:
Version 0.1
md5: ee12e64399173791a922ec82cb2c06eb
Screenshots:
Big thanks to ChainsDD (http://androidsu.com) for Superuser and Koush (http://www.clockworkmod.com) for CWM.
Click to expand...
Click to collapse

I just uploaded version 2
Not a lot has changed feature-wise, but there are many changes under the hood to hopefully make it safer and more reliable.

The included Superuser "zip" should be flashed by booting on Recovery, right? Or the GUI will offer an option?
Thanks!

ferossan said:
The included Superuser "zip" should be flashed by booting on Recovery, right? Or the GUI will offer an option?
Thanks!
Click to expand...
Click to collapse
Depends most common way is to boot an insecure image then remount system as root then send su and Superuser.apk (and of course) create symboliks link)
I have coded in C++ a tool to root your device in one click. Works in Windows/Mac/Linux and yes it does have a GUI, it is not a command line appliation
Sent from my Nexus 7 using Tapatalk 2

ferossan said:
The included Superuser "zip" should be flashed by booting on Recovery, right? Or the GUI will offer an option?
Thanks!
Click to expand...
Click to collapse
That is done automatically by the GUI
Basically when you click the "root" button it does this:
1. Reboots into bootloader mode
2. Boots a temporary CWM
3. Copies the included Superuser zip to the internal storage
4. And then it flashes the zip
These are the exact commands it runs if you wanted to do it manually:
Code:
$ ./tools/adb reboot bootloader
$ ./tools/fastboot oem unlock
$ ./tools/fastboot boot ./data/recovery-clockwork-6.0.1.0-grouper.img
$ ./tools/adb shell mount /data
$ ./tools/adb push ./data/Superuser-3.1.3-arm-signed.zip /sdcard/
$ ./tools/adb shell recovery --update_package=/sdcard/Superuser-3.1.3-arm-signed.zip

steevp said:
That is done automatically by the GUI
Basically when you click the "root" button it does this:
1. Reboots into bootloader mode
2. Boots a temporary CWM
3. Copies the included Superuser zip to the internal storage
4. And then it flashes the zip
These are the exact commands it runs if you wanted to do it manually:
Code:
$ ./tools/adb reboot bootloader
$ ./tools/fastboot oem unlock
$ ./tools/fastboot boot ./data/recovery-clockwork-6.0.1.0-grouper.img
$ ./tools/adb shell mount /data
$ ./tools/adb push ./data/Superuser-3.1.3-arm-signed.zip /sdcard/
$ ./tools/adb shell recovery --update_package=/sdcard/Superuser-3.1.3-arm-signed.zip
Click to expand...
Click to collapse
Thank you very much. Now everything is comprehensible. :good:

Please do not quit working on this! It worked perfectly for Ubuntu 12.04 and it was very simple and fast.
Doing it manually is a lot of fun, but it's definitely not for everyone.
Thanks again!

Version 3 is now up
This version fixes a bug and adds a backup/restore function for your apps and shared data
PotentChili said:
Please do not quit working on this! It worked perfectly for Ubuntu 12.04 and it was very simple and fast.
Doing it manually is a lot of fun, but it's definitely not for everyone.
Thanks again!
Click to expand...
Click to collapse
Thanks for testing I appreciate it

Related

[BETA][TOOL] adb_bak2computer [MAC & LINUX][UPDATED: 11/15/2012]

BETA TESTERS NEEDED!!
DESCRIPTION: adb_bak2computer.sh
- tool (set of scripts) to backup d2vzw (SCH-I535) partitions directly to a users computer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
PROGRESS:
- Beta5 - Now in two flavors, Mac and Linux!!
- Fully functioning tarballs are attached to the OP (as always)
TO-DO/KNOWN BUGS
- Re-wrote the code so it actually works on Linux now. (See the _Linux tar)
- All known bugs fixed. Unless someone points one out.
- To Do: Add functionality to wrap backups into a flashable zip (it'll be a big zip, but its one file to keep track of instead of blobs or sets of img files) This should be the first restore option I explore.
- To Do: Automate a standard backup (include: System, Boot, Data)
- To Do: Automate a set of backups that are compatible with TWRP. Why TWRP, cause I like it, and the differential backups that CWM does will be problematic for this tool. (I may need some help on this one.)
WARNING USE AT YOUR OWN RISK
I am not responsible if this tool destroys your soul, or your phone, or it makes a rainbow rhinoceros shoot out your bum.
NOTE: We all know the risks of doing stuff like this by now right? But the warning is still par for the course I guess. Is there a standard warning file I could link to, and make it all fancy and legal? Kinda like creative commons license only creative warning instead? Moving on...
PREREQUISITES
YOUR DEVICE MUST BE ROOTED
Linux or Mac operating system (maybe Cygwin might work, but I haven't tested it)
If you are on Linux you must have xterm installed (gnome-terminal or konsole alone won't work)
Must have the android SDK installed, and "platform-tools" must be in your $PATH
Process Viewer, "pv", must be installed
NOTE: To check if you have Process Viewer installed run pv --version in your terminal, if its not there download from here and install.
INSTRUCTIONS:
Download the appropriate tar for your OS
Extract it to a folder named "adb_bak2computer" in your $HOME directory.
Chmod everything so its all executable (chmod -Rf 777 ~/adb_bak2computer ).
Make sure your SGS3 is plugged into your machine via USB, and that you have USB debugging enabled.
If you are on CM10 or some other AOSP based ROM check the preference that keeps the screen on while plugged in.
If you are on a TouchWiz ROM use something like Wake Lock - PowerManager and force a full wakelock so your device doesn't go to sleep and or lock out adb debugging.
Run adb_bak2computer.sh from the terminal.
Pick a number
ALL CREDIT GOES TO:
das7982 - for ODIN guide here:
http://forum.xda-developers.com/showpost.php?p=28876440&postcount=1
scandiun - for "nandroid" backup directly to computer guide here:
http://forum.xda-developers.com/showpost.php?p=29862574&postcount=1
(and whomever they credited in their guides as well)
Feel free to fork, download, mod, make it all pretty, whatever you want. Its all open for sharing.
REPOS:
http://github.com/ALQI/adb_bak2computer-Mac
http://github.com/ALQI/adb_bak2computer-Linux
PM me if you want to help me with this tool, or just want to have a nice cup a tea.
Ta,
ALQI
REFERENCE THREADS:
El Grande Partition Table Reference -- E.V.A
Unlock Bootloaders -- AdamOutler
Android Kitchen -- dsixda
Look's kinda cool. Can't wait till this is finished!
Why not just use "rsync for android" from the market?
Sent from my Galaxy Note 10.1 using Tapatalk 2
blulite said:
Why not just use "rsync for android" from the market?
Sent from my Galaxy Note 10.1 using Tapatalk 2
Click to expand...
Click to collapse
That's for file based backups, which is great and I love rsync and ssh, but its not what I'm looking for. I want full on partition images going directly from my phone to my laptop (hopefully at USB2.0 speeds). So far the only way that I have seen that can do this is with scandiun's guide here:
http://forum.xda-developers.com/showpost.php?p=29862574&postcount=1
It works. I've tried scandiun's original directions and it does produce viable iamges. What I want to do is automate/simplify that process.
So far, I haven't had a chance to figure out how to get adb to play nice with spawning subprocesses in bash scripts.
like :
Code:
#!/bin/bash
function1(){
echo "function is running"
adb forward tcp:5555 tcp:5555
adb shell /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd bs=4096 if=/dev/block/mmcblk0p17
}
function2(){
echo "function2 has to finish execution before either function can exit"
adb forward tcp:5555 tcp:5555; cd ./Cache_Test; nc 127.0.0.1 5555 | pv -i 0.5 > ./mmcblk0p17_cache.img
wait
echo "function2 is done"
}
function0(){
(function1)&
(function2)&
wait
exit
}
function0
wait
exit
This code doesn't work though. And I'm pretty sure its because adb needs actual separate terminals (not subprocesses) to run the two instances of adb forward.
This means I need a portable way to spawn new terminals. I've tried xterm -e [command] and that kinda works on linux but not on mac and I doubt it would on cygwin/windows. I may have to re-write this in python, but I'd rather use bash cause not everyone has python installed or is comfortable using it. Also, I'm lazy and I don't want to have to re-write what seems to be perfectly viable code.
Ta,
ALQI
FYI - I thought the cache partition would be a small safe partition to play around with, but its like 800MB on my device. I'll pick another for my next test/example.
Eureka (I think)
Ok, so I have a set of scripts now that can do what I need. That is execute in new terminal windows and play nice with adb.
This script (which can be .sh file), calls the other two .command files and actually backs up my cache partition.
Code:
#!/bin/bash
cd ./adb_bak2computer
open ./cache_bak1.command
sleep 2
open ./cache_bak2.command
wait
echo "cache should be backed up."
Here's the first command file:
Code:
#!/bin/bash
cache_bak1(){
echo "cache_bak1 is running"
adb forward tcp:5555 tcp:5555
sleep 2
echo "/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd bs=4096 if=/dev/block/mmcblk0p17" | adb shell
wait
}
cache_bak1
Here's the second one:
Code:
#!/bin/bash
cache_bak2(){
cd ./adb_bak2computer
echo "cache_bak2 is running"
adb forward tcp:5555 tcp:5555
sleep 2
nc 127.0.0.1 5555 | pv -i 0.5 > ./mmcblk0p17_cache.img
wait $!
echo "cache_bak2 is done"
}
cache_bak2
For some reason I to pipe in an echo of the command I wanted to run in "adb shell".
Also, depending on your terminal settings, the windows for the two command files will stay open even when they are done. To fix that, just make sure your preferred terminal emulator is set to close when a process is complete.
I'd still like to get subprocesses (from post #4) to work but its stating to look like adb no likey.
I'll try and have the rest of the code for all the paritions up within the next few days, I still have some things to figure out though. I can use a menu to seperate the dd instances or loop/wait for the pid's of each instance to quit before moving on to the next partition, I'm on the fence as to whether I want everything to run consecutively or to give users the option to pick each partition they want to back up. Maybe I can do both, but that will take longer for me to finish.
Please excuse the crap typing as I'm doing this all in my "spare" time, which means I should be sleeping.
Ta,
ALQI
Why not just make scripts pull each partition? Adb can simply pull them......
Sent from my SCH-I535 using xda app-developers app
tonu42 said:
Why not just make scripts pull each partition? Adb can simply pull them......
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
IIRC, adb pull is for files only. It can't pull full partition images.
I'm getting full partition images that can be (hopefully) used for Odin restoration and maybe nandroid or cwm restore.
Thanks for the input.
Ta,
ALQI
Sent from my SCH-I535 using xda app-developers app
ALPHA Version
OP is updated with fully functional alpha release of the tool.
Ta,
ALQI
Going to have to check this out over the weekend when I can sit down and read first.
Thank you for providing us with an alternative backup solution.
Sent from my SCH-I535 using Tapatalk 2
ok, so backing up the data block is HUGENORMOUSBIG
maybe mmcblk0p15 is including the internal sdcard because of that /data sub folder link to the sdcard?
I dunno for now, I'm going on 45mins and 6Gigs. I'll have to take a look in teh morning
Just wanted to let people know that this is not abandoned.
I only have one last hurdle. And that's getting an img file for /data without backing up /data/media (which is essentialy your internal sdcard). I can't really do a block dump cause mmcblk0p15 (am I even close there) is all userdata including /data/media.
Any ideas would be helpful? (Hint Hint)
Ta,
ALQI
Sent from my SCH-I535 using xda app-developers app
update ready to roll for Beta testers
alquimista said:
Just wanted to let people know that this is not abandoned.
I only have one last hurdle. And that's getting an img file for /data without backing up /data/media (which is essentialy your internal sdcard). I can't really do a block dump cause mmcblk0p15 (am I even close there) is all userdata including /data/media.
Any ideas would be helpful? (Hint Hint)
Ta,
ALQI
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
I got /data backup working (yay me).
OP updated!!
alquimista said:
- Thread title updated with your American way of noting the date
Click to expand...
Click to collapse
My American way of noting the date is an ISO standard... YYYY-MM-DD
OP updated with new beta2 version of the tool.
Github commited as well.
ALL mmc blocks are set for backup now, check in the "CRAZY BACKUP OPTIONS" menu for the crazy backup options.
Next up:
Fix the echo [command] | adb shell scripts not exiting without CTRL+C
Option to have the basic backups turned into an "update".zip
Ta,
ALQI
Beta3
OP Updated with Beta3
Android side adb hang bug is fixed. Yay me.
GitHub updated as well.
Ta,
ALQI
HAAAAALLP!!!
I'm struggling a bit with creating a flashable zip with the files I get using my tool.
Basically I can pick whatever partition I want, but lets just say I want a standard backup and I've run my tool pulling the following:
Code:
boot.emmc.img
cache.ext4.img
data.ext4.tar
recovery.emmc.img
system.ext4.img
Actually, ican name them whatever I want and use whatever I want, so lets simplify that even greater and just go with:
Code:
boot.img
data.tar
system.img
The updater-binary and accompanying updater-script is pretty straight forward for the boot.img and system.img, the script would have something like:
Code:
write_raw_image PACKAGE:system.img SYSTEM:
write_raw_image PACKAGE:boot.img BOOT:
That's a bit of an over simplification depending on the updater-binary I wind up using, but its the right idea (some of the wording might change a bit but the "write_raw_image" part is whats important).
But what do I do with data.tar? Can I unpack that tar directly to "DATA:"? Something like:
Code:
package_extract_dir PACKAGE:data DATA:
I don't know if the updater-binary supports this with a tar??
I could unpack the tar file before creating the zip, but then I have to set all the permissions, which should have been preserved in the tar. Or can I just write a little script to go inside the zip that will essentially "tar -xf /tmp/data.tar /data" and unpack the tarball while in recovery?
I dunno, any ideas??
This would be alot easier if I could workout a way to dd a data.img without including the internal sdcard.
Ta,
ALQI
Beta4
OP Updated with Beta4
Github as well
Added funtionality to backup internal and external SDCards.
Ta,
ALQI
Important: Mac only
I just realized that this code probably won't work on Linux.
I'm on a Mac for most of my work, so I've been making all this on a Mac (OS X Lion 10.7). The "open" command probably won't work on linux or Cygwin.
I just need to add a quick check for for the OS and then use "xterm" instead of "open" for the .command files.
Actually, since I'm doing alot of cleanup and such, I will probably remove file extensions for most of the scripts.
Anyway, sorry for any confusion. I haven't been awake for most of this. But its definately a great big FAIL on my part. Well at least until I fix it.
Ta,
ALQI
BETA5 - Now works on Linux!!
OP Updated (as well as new repos) for new linux version.
Had to seperate out a version for linux cause Macs are dumb and can't open new terminal windows without the "open" command.
Tars are attached to the OP!!

[RECOVERY]CWM Touch 6.0.2.8 for MEDION LIFETAB P9514 [25.2.2013]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello everybody!
The long wait has finally come to an end, as I successfully compiled CWM Touch Recovery for Medion Lifetab P9514. It works great on IceCreamSandwitch 4.0.3 Release 2 and it should also work on previous ICS updates. However, it is not compatible with Honeycomb 3.2!
Before we begin a warning is in order: You are making changes to your tablet’s software at your own risk!
So let's start. I advise you to first backup your stock recovery, just in case something goes wrong. There are couple of methods to do this. I will describe in my opinion the easiest, with adb commands for Microsoft Windows or Linux OS. This way you are not required to boot your tablet in special modes (fastboot or APX).
GETTING STARTED
When you connect LIFETAB to your PC, drivers should be installed automatically in Windows Vista/7. If they are not or if you encounter any erros, try the guide for Windows XP (original guide by @Pummelchen - android-hilfe.de).
Download drivers for WinXP: http://www.medion.com/au/service/_lightbox/treiber_details.php?did=10725
Extract the drivers - double click on "usb_p9514wxp.exe"
"Medion" folder will be created on C:/ drive, in there you will see "android_winusb.inf".
Open Device Manager: either by following the path "Start/Control Panel/System/Advanced System Settings/Hardware/Device Manager" or by right-clicking on "Computer" - "Properties" in start menu.
Connect your LIFETAB with a microUSB/USB Cable to the PC an wait for a few seconds.
In Device Manager "Other devices" should appear, there you will see "MTP" with a yellow exclamation mark. Right-click on it and choose "Properties".
Under "Driver tab" choose "Update driver".
Browse to C:/Medion and start the installation.
ADB/Fastboot tool for windows (USB drivers included): http://www.mediafire.com/download/bklnjn2x0fbln4b/MD_LT_P9514_Drivers_ADB_Fastboot.zip
You can install adb tools in Linux by following this guide: http://forum.xda-developers.com/showthread.php?t=2431956
Make sure you have USB-debugging enabled on your tablet (Settings – Developer options – USB debugging)
Run Windows Command Prompt (Start Menu – Run… – write in “cmd” – press OK); point the cursor to the ADB folder by using “cd” command (a simpler way: press SHIFT and right-click on ADB folder, choose "Open this folder in command window")
Open Terminal in Linux
Write the following order of commands in cmd:
BACKUP STOCK RECOVERY
See if your device is recognized (a long number)
Code:
adb devices
Enter the adb session
Code:
adb shell
Get root privileges
Code:
su
Make /system partition readable-writable, so you can make changes
Code:
mount -o rw,remount /system
Backup 1st file
Code:
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.backup
Backup 2nd file
Code:
mv /system/recovery-from-boot.p recovery-from-boot.p.backup
Create and backup stock recovery image file
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/download/original-recovery-p9514.img
RESTORE STOCK RECOVERY
Should you at any time encounter problems with cwm touch, or you simply don't like it, you can restore your stock recovery. The commands are therefore reversed:
Restore 1st file
Code:
mv /system/etc/install-recovery.sh.backup /system/etc/install-recovery.sh
Restore 2nd file
Code:
mv /system/recovery-from-boot.p.backup /system/recovery-from-boot.p
Restore stock recovery to mmcblk0p1 partition
Code:
dd if=/sdcard/download/original-recovery-p9514.img of=/dev/block/mmcblk0p1
Warning: Be carful to use the right number in mmcblk0p1. This is /recovery partition, if you use others you might brick your tablet!
An easier way to have stock recovery back is to simply re-flash ROM update zip file. But by doing this you will loose root privileges, configuration and possibly user data.
I suggest you save "original-recovery-p9514.img" also to your external sdcard and possibly to your PC. You can use your USB connection cable or a file explorer (like ES File Manager) to transfer the file to an external data storage. Another option is this adb command:
Code:
adb pull /sdcard/download/original-recovery-p9514.img
FLASH CWM TOUCH RECOVERY
Now that you’ve successfully backed-up our stock recovery, let’s flash the new cwm touch. Again there are a couple of ways to do this, I will describe in my opinion the easiest.
First download attached file, extract it and copy cwm-recovery-p9514.img to your internal sdcard. You can simply use a USB connection cable and transfer the file to the path “/sdcard/download” or use a file explorer (like ES File Manager) to copy the file.
Another method is with ADB commands. Put cwm-recovery-p9514.img in ADB folder on your PC. Open windows command window and check that your tablet is recognized (adb devices). The following line will transfer the .img file to “download” folder (you can use any other name, but the folder needs to exist on your sdcard):
Code:
adb push cwm-recovery-p9514.img /sdcard/download
To flash cwm recovery on the recovery partition, use the following commands:
Code:
adb shell
su
mount -o rw,remount /system
dd if=/sdcard/download/cwm-recovery-p9514.img of=/dev/block/mmcblk0p1
You can now reboot your tablet.
INSTALL CWM TOUCH RECOVERY USING TERMINAL EMULATOR
This is a simpler and faster way to flash my cwm touch recovery, without needing a PC/Laptop.
Install one of free terminal emulators from Google Play Store.
Here are a couple of options:
ConnectBot
Android Terminal Emulator
Providing you already copied "cwm-recovery-p9514.img" to your tablet, skip this step. If not, look at the previous steps.
Open the terminal emulator app and insert these lines:
Code:
su
mount -o rw,remount /system
dd if=/sdcard/download/cwm-recovery-p9514.img of=/dev/block/mmcblk0p1
To restore your original recovery:
Code:
su
mount -o rw,remount /system
dd if=/sdcard/download/original-recovery-p9514.img of=/dev/block/mmcblk0p1
USING CWM TOUCH RECOVERY
To enter cwm recovery mode press hard buttons in combination: power off your tablet, press and hold VOLUME UP (PLUS) and press POWER. Once you see "Ota…" in the top left corner of the display, quickly press:
1X VOLUME DOWN (MINUS),
2X VOLUME UP (PLUS),
1X VOLUME DOWN (MINUS).
You will see the counter go to 4 and cwm recovery will start.
For a more practical access to the recovery, use this app: Quick Reboot.
Make a backup of your rom as soon as possible, to save your data.
Please do not attempt to flash any zip files using this recovery. You may damage your tablet in doing so.
"Wipe cache partition", "wipe dalvik cache" and "fix permissions" are safe processes, but use "wipe data/factory reset" only when needed.
ADDITIONAL INFORMATION
NOTE: I will leave older versions of cwm touch recovery available, should you have any problems with newer ones.
This guide wouldn't be possible, without the help from guys on http://www.avi-plus.com, Yves & Micky.
XDA:DevDB Information
[RECOVERY]CWM Touch 6.0.2.8 for MEDION LIFETAB P9514 [25.2.2013], ROM for the Android General
Contributors
MMWolverine
ROM OS Version: 2.3.x Gingerbread
Version Information
Status: Testing
Created 2015-02-04
Last Updated 2015-11-01
Briliant! Just found out, that there is CWM for my "old" P9514 ... great work!
Hope there will be some Custom-ROMs soon; maybe on CM basis - the Stock ROM is not that what I would call "well".
d3rm1k said:
Briliant! Just found out, that there is CWM for my "old" P9514 ... great work!
Hope there will be some Custom-ROMs soon; maybe on CM basis - the Stock ROM is not that what I would call "well".
Click to expand...
Click to collapse
Thanks! Actually not to difficult making a cwm recovery, but when it comes to custom roms I'm still a bit of a noobie. I am learning fast though, so maybe in the near future.
Oh btw, here's the recovery guide in german language: http://www.handy-faq.de/forum/medio...on_lifetab_p9514_13_1_2013_a.html#post2385512
Yes, I know. Because of that German post I searched here, hoping that there already might be a Custom ROM.
But I only have a LogIn here and not the muse to sign up at handy-faq.de, yet
Many thanks for this cwm, the installation worked like a charm.
One small remark, to enter cwm you have to hold the Volume Up (Plus) and Power button. You could perhaps change this in your guide (it is correctly in the guide in german language)
I have translated your guide to Dutch on my blog, I'll hope it's no prob:
http://blog.johanvanbogaert.be/2013/02/clockworkmod-voor-de-medion-lifetab.html
Rgrds Johan
Jopeke said:
Many thanks for this cwm, the installation worked like a charm.
One small remark, to enter cwm you have to hold the Volume Up (Plus) and Power button. You could perhaps change this in your guide (it is correctly in the guide in german language)
I have translated your guide to Dutch on my blog, I'll hope it's no prob:
http://blog.johanvanbogaert.be/2013/02/clockworkmod-voor-de-medion-lifetab.html
Rgrds Johan
Click to expand...
Click to collapse
Thanks for notifying me about the mistake, I already corrected it.
I updated the cwm to newest 6.0.2.8 and will change the adb drivers part of the guide, as some users have difficulties understanding it.
I see no problem that you translated my guide, after all it's from different sources and made to be used for free.
MMWolverine said:
Thanks for notifying me about the mistake, I already corrected it.
I updated the cwm to newest 6.0.2.8 and will change the adb drivers part of the guide, as some users have difficulties understanding it.
I see no problem that you translated my guide, after all it's from different sources and made to be used for free.
Click to expand...
Click to collapse
Hi MMWolverine, already flashed v6.0.2.8, only took a minute.
I've updated my own blog as well.
Instead of using adb it is much easier to use a terminal emulator (like ConnectBot) on Android todo the update.
To install cwm someone only needs his tablet, ConnectBot and ES File Explorer. No PC, adb, usb connection necessary for flashing cwm.
If someone has rooted his lifetab, your guide is more then easy to understand to do this installation.
But if you don't wan't to use a PC for flashing the following is possible: From the lifetab download the zip, extract with ES File Explorer,Flash with ConnectBot (only the 3 last commands from your guide are necessary: su,mount..., dd....)
Actually, I did plan to do both guides. But I wasn't sure how many people would agree to install the terminal. Will probably do this, as you recommend.
I was also hoping, that the recovery would be uploaded to Rom manager app. Says on recovery maker website, that you need to be the device owner. Medion still isn't added to device list.
I have checked ROM Manager before doing the installation manually, its a pitty its not jet implemented in ROM Manager. But the installation is quit straight forward.
If someone is ever making a custom ROM for the LifeTab P9514, please implement USB OTG, because thats an option I'm waiting for.
Great that you added the instructions todo the installation through a terminal emulator on Android. Just one remark, the adb shell command can be removed while using a terminal on Android.
What happens if you try to flash a zip with CWM? Why doesn't it work and what would break?
You need a properly written updater-script. If a zip isn't compatible, you will only get an error, but nothing will be changed.
Do you know if the CM10 based ROM that works on the P9516 would work on the P9514 too?
Thanks
The answer is no. CM roms are hardware based and if you would flash p9516 rom on p9514 it wouldn't even boot.
lost p9514 Stock rom
Hi together!
I have a problem! I want to get back to unrooted original stock rom in lifetab p9514.
Somehow, dont ask me how, I lost the backed up version.
Is there a possibility to download such rom - I couldnt find anything!
Thanks in advance!
W
wfmagic said:
Hi together!
I have a problem! I want to get back to unrooted original stock rom in lifetab p9514.
Somehow, dont ask me how, I lost the backed up version.
Is there a possibility to download such rom - I couldnt find anything!
Thanks in advance!
W
Click to expand...
Click to collapse
Hello,
you can get official rom by typing in your MSN number (written on the back of your tablet): http://www.medion.com/de/service/download/software.php
And I have a mirror here: http://www.mediafire.com/download/xi5b93rj55bc0e7/Lifetab_p9514.20120719.2-ICS-signed-ota-update.zip
Hope that helps.
works like a charm!
I love this Forum - thank you very much!

[TOOL] [LINUX/MAC/WINDOWS] Nexus Tools 5 (Featured by XDA)

Nexus Tools
Nexus Tools is a simple installer for the Android SDK Platform Tools package, which includes ADB, Fastboot, Systrace, and other applications. Nexus Tools is written in Dart, and can run on Linux, macOS, Windows, Windows Subsystem for Linux, and Chrome OS.
Nexus Tools downloads the latest Platform tools package directly from Google's servers (so you're always getting the latest version), saves them to ~/.nexustools, and adds the directory to your system's path. On Windows, Nexus Tools can optionally install Koush's Universal ADB Driver.
Once Nexus Tools is finished, you can run adb, fastboot, and other commands with no problems. You need to open a new terminal/command line window after installation for changes to take effect. The SDK Platform Tools can be updated by running nexustools -i, or you can uninstall everything by running nexustools -r.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How to use on Linux, macOS, and Chrome OS
Paste this command into the Terminal app:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/main/install.sh)
You can also download the Mac and Linux versions from the latest release page, un-zip the file, and run it from the Terminal.
Once Nexus Tools is finished, you can run adb, fastboot, and other commands straight from the terminal. You may need to open a new terminal window for changes to take effect. To update, just run the installer again.
How to use on Windows
Open Windows PowerShell from the Start Menu and paste this command:
Code:
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/main/install.ps1'))
You can also download the Windows version from the latest release page, un-zip the file, and run it from Windows PowerShell or the Command Prompt.
New in Nexus Tools 3.0:
Cleaned up script code
Fixed udev list being installed on Mac OS X, even though OS X doesn't need it
Less output spam during installation
New logo
corbin052198 said:
New in Nexus Tools 3.0:
Cleaned up script code
Fixed udev list being installed on Mac OS X, even though OS X doesn't need it
Less output spam during installation
New logo
Click to expand...
Click to collapse
Hey, I appreciate your work mate. Nexus Tools has worked well on my Mac. Thanks for creating this tool set. Keep it up!
syintiphic said:
Hey, I appreciate your work mate. Nexus Tools has worked well on my Mac. Thanks for creating this tool set. Keep it up!
Click to expand...
Click to collapse
Glad it worked for you!
New in Nexus Tools 3.1:
Added smart remove (on Ubuntu and Debian linux, Nexus Tools will automatically check if the distro's ADB/Fastboot packages are present and allow you to uninstall them)
Changed udev rules list to automatically overwrite existing list
No longer installs udev list on Mac OS X (because it doesn't use it)
sorry to bother, but will this very useful tool be updated to the latest adb and fastboot versions ? afaik the last adb version is 1.0.35 and the current installed is 1.0.32.
thanks a lot in advance !
I've installed it but the terminal still says -bash: adb: command not found
where can i find 1.0.32? The adb version i have now is 1.0.31...
Any chance you can update the script to install ADB 1.0.36?
UPDATED: I downloaded the latest SDK Tools and moved the adb and fastboot binaries into the .nexustools folder and made the binaries executable using chmod +x on both binaries so now I have adb 1.0.36 and the latest fastboot
1619415 said:
Any chance you can update the script to install ADB 1.0.36?
UPDATED: I downloaded the latest SDK Tools and moved the adb and fastboot binaries into the .nexustools folder and made the binaries executable using chmod +x on both binaries so now I have adb 1.0.36 and the latest fastboot
Click to expand...
Click to collapse
Hey, would you be able to send me the adb and fastboot files? I don't have Android Studio installed on my Mac and so I can't use sdk tools to update my adb to 1.0.36. Thanks.
corbin052198 said:
Nexus Tools is an installer for the Android debug/development command-line tools ADB (Android Device Bridge) and Fastboot for Mac OS X and Linux. The script does not need to be downloaded, simply copy and paste this command into the terminal and run it to install ADB/Fastboot:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
and this command to un-install Nexus Tools:
Code:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/uninstall.sh)
Nexus Tools requires sudo privileges to install/uninstall the adb and fastboot tools to /usr/local/bin, so they can be run without typing the full directory. Nexus Tools is licensed under the GPLv3 license, and the source code is at the GitHub project below.
If you have a problem with Nexus Tools, leave a reply below or as an issue on the GitHub project!
GitHub Project
XDA News Article
Click to expand...
Click to collapse
Thank You so much. You are a life saver. This is amazing. Looked all over for this. It was hard to find.
Thank You.
1619415 said:
Any chance you can update the script to install ADB 1.0.36?
UPDATED: I downloaded the latest SDK Tools and moved the adb and fastboot binaries into the .nexustools folder and made the binaries executable using chmod +x on both binaries so now I have adb 1.0.36 and the latest fastboot
Click to expand...
Click to collapse
Also anyone that's on Linux another way to make adb/fastboot or any binary for that matter executable is to just put a " dot followed by a forward slash in front of your adb or fastboot command " like so...
./adb devices
./fastboot devices
Work like charm on el capitan, thanks for this quick an amazing script
1619415 said:
Any chance you can update the script to install ADB 1.0.36?
UPDATED: I downloaded the latest SDK Tools and moved the adb and fastboot binaries into the .nexustools folder and made the binaries executable using chmod +x on both binaries so now I have adb 1.0.36 and the latest fastboot
Click to expand...
Click to collapse
I ran your script today and ADB is showing 1.0.32 for me. Any way I can get it to 1.0.36?
Google Releases Separate ADB and Fastboot Binary Downloads
could some one tell me where to place the files i want to flash.. i'm not a pro thanks in advance
hjjiang said:
Google Releases Separate ADB and Fastboot Binary Downloads
Click to expand...
Click to collapse
thanks a ton you saved me a lot of time. thanks a lot
I just updated Nexus Tools to version 3.3, which updates the ADB/Fastboot binaries to the latest versions. Enjoy!
i try this but got a message
"Illegal instruction"
i also try
"PATH=~/.nexustools:$PATH"
but there is nothing happen
my computer is mac osx 10.6
how could i fix it
thank you
I can install and working well without any doubt till today.. using the copy of script directed to my terminal.. thanks alot

I need help rooting my zte quest 5

Ok so i got a zte quest 5 (z3351s) though qlink. Not the phone i wanted but it was one i could afford. And it works very well just can't run amazon music and other apps at the same time.
But the bloatware is unreal. Used to in my galaxy s3&s4 days i could root and delete all apps i didn't need. I know i can disable them but i want them gone completely.
Majisk didnt work
Kingoroot same even used pc.
I am hoping someone knows of a way i can root this phone or at least delete all the un needed apps for example i have Google maps go (came stock) i put the org google maps which is better plus offers sat view.
Edit i did some math and converting and the useless apps 11 out of 58 come out to 349.72mb which is a lot if your phone only has 16gb of space. Also note i don't have hardly anything.
Worst case i can Hotspot to my note10+ for multitasking but not sure of data limit.
@TexasPride
a phone's Android can get considered "rooted" as soon as in Android the SU-binary is present. Hence you at any time at your own can install the appropriate SU-binary onto your phone's Android by means of ADB.
I heard about adb methods but i haven't messed with it in forever since apk/ios apps came out
jwoegerbauer said:
@TexasPride
a phone's Android can get considered "rooted" as soon as in Android the SU-binary is present. Hence you at any time at your own can install the appropriate SU-binary onto your phone's Android by means of ADB.
Click to expand...
Click to collapse
Are you sure it will always work?
I tried this method of installing supersu: https://github.com/spff/install-supersu-via-adb
As a result, I got my phone eternally showing the boot logo and not booting.
Not a problem to re-flash stock ROM but it is an example that there in no universal way to install SU (or SuperSU) via adb.
If you could give a link to some other method how SU could be installed, I'll give it a try of course.
vp1117 said:
Are you sure it will always work?
I tried this method of installing supersu: https://github.com/spff/install-supersu-via-adb
As a result, I got my phone eternally showing the boot logo and not booting.
Not a problem to re-flash stock ROM but it is an example that there in no universal way to install SU (or SuperSU) via adb.
If you could give a link to some other method how SU could be installed, I'll give it a try of course.
Click to expand...
Click to collapse
I spoke of SU-binary and NOT of SuperSU installer package
Example:
Code:
adb devices
adb push <location-of-matching-su-binary-on-computer> /sdcard/Downloads/ 2>nul
adb shell "chmod 0777 /sdcard/Downloads/su"
Of course you can install SuperSU package by means of ADB and this even when device is booted into Stock Recovery: but this requires to make some mods to SuperSU zip.
TexasPride, sorry I stepped in your thread.​
jwoegerbauer said:
I spoke of SU-binary and NOT of SuperSU installer package
Click to expand...
Click to collapse
I see. It is often mixed in numerous materials one can find in the net. Subject is SU-binary update, but the ultimate goal is to install supersu.
jwoegerbauer said:
Example:
Code:
adb devices
adb push <location-of-matching-su-binary-on-computer> /sdcard/Downloads/ 2>nul
adb shell "chmod 0777 /sdcard/Downloads/su"
Click to expand...
Click to collapse
What should be result of running this code? SU-binary located in Downloads with 777 permission? What is the practical sense/use of it?
What software/application would use SU in that location?
Sorry for my questions. I'm not arguing. I try to understand the idea.
jwoegerbauer said:
Of course you can install SuperSU package by means of ADB and this even when device is booted into Stock Recovery: but this requires to make some mods to SuperSU zip.
Click to expand...
Click to collapse
Somehow, with my almost zero knowledge of edify and linux command line I got the same conclusion: SuperSU zip has to be modified in order to install it via adb on devices that do not have TWRP for sideload. I failed to find any examples of SuperSU modding...
@vp1117
Answering your questions from last to first:
Installing SuperSU.zip via ADB
The SuperSU.zip doesn't come with an EDIFY coded script, but with an Android SHELL script - everyone who has knowledge of LINUX scripting can read / modify it.
Android comes with TAR-binary, but not ZIP-binary. Hence the SuperSu.zip must get repacked into SuperSU.tar thus it can get extracted on Phone. The contents of such a TAR-file would look as shown here
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Making use of SU-binary
The SU-binary ( ~110KB ) is nothing else then the root user, as known from LINUX.
Running in Android via ADB a command that requires super-user ( root ) rights is done as follows
Example:
Code:
adb devices
adb shell "/sdard/Downloads/su -c '<ommand-that-requires-root-here>'"
jwoegerbauer said:
Answering your questions from last to first:
Installing SuperSU.zip via ADB
The SuperSU.zip doesn't come with an EDIFY coded script, but with an Android SHELL script - everyone who has knowledge of LINUX scripting can read / modify it.
Android comes with TAR-binary, but not ZIP-binary. Hence the SuperSu.zip must get repacked into SuperSU.tar thus it can get extracted on Phone. The contents of such a TAR-file would look as shown here
Click to expand...
Click to collapse
OK. I guess, I can repack zip to tar.
Sorry for my silly question but why should I need to keep superSU as an archive? Could not I just upload all folders + update-binary.sh to the phone? I'm sure I can do it.
Am I right my next step would be running update-binary.sh (~60 KB) from <adb shell> command line?
jwoegerbauer said:
Making use of SU-binary
The SU-binary ( ~110KB ) is nothing else then the root user, as known from LINUX.
Running in Android via ADB a command that requires super-user ( root ) rights is done as follows
Example:
Code:
adb devices
adb shell "/sdard/Downloads/su -c '<ommand-that-requires-root-here>'"
Click to expand...
Click to collapse
Interestingly, I can execute all commands I need without having su-binary (~100 KB) uploaded to my phone. It is strange but I see #-prompt after I ran <adb shell>. This happens on my UNrooted phone, running stock ROM. I guess, it's a specifics of my phone, no need to try explain it.
I done failed trying to read i dont really understand linux all that well. But if anyone has any links so i can download it and try it
vp1117 said:
Sorry for my silly question but why should I need to keep superSU as an archive? Could not I just upload all folders + update-binary.sh to the phone? I'm sure I can do it.
Am I right my next step would be running update-binary.sh (~60 KB) from <adb shell> command line?
Click to expand...
Click to collapse
Of course it's your decision how you transfer the SuperSU package onto phone: many ways lead to Rome.
My decision was to push SuperSU package repacked as TAR-file onto phone, extract it there, and finally run the modified update-binary.sh when phone is booted into recovery mode:
Code:
adb shell "$(cat < %supersu_dir%/update-binary.sh); echo $?"
So I rebooted to stock recovery and then uploaded following from UPDATE-SuperSU-v2.82-20170528234214.zip package to my phone's folder /tmp:
/arm64
/common
/META-INF
update-binary.sh
Here is what I got:
Z:\android\adb>adb shell "$(cat < /tmp/update-binary.sh); echo $?"
127
/system/bin/sh: #!/sbin/sh: not found
And here's what I got running same command from # command line:
# $(cat < /tmp/update-binary.sh); echo $?
/system/bin/sh: #!/sbin/sh: not found
127
In response to # ls -al /sbin I get lots of lines one of them is as follows:
lrwxrwxrwx 1 root root 7 1970-01-01 00:00 sh -> busybox
I feel that I'm doing something wrong, but what exactly?
In attached txt-file I put some more details I got in command line.
jwoegerbauer said:
... and finally run the modified update-binary.sh when phone is booted into recovery mode:
Click to expand...
Click to collapse
Am I right the only modification needed is to rename update-binary to update-binary.sh ?
@vp1117
NO.
When I said modified then I didn't mean simply rename it: The contents of original update-binary file must be rewritten / deleted in some parts. Also, believe me, it makes sense to repack original SuperSU.zip to SuperSu.tar as I demonstrated above. Take also note that, if device's Android isn't rooted yet, the location for unpacked SuperSU mandatory must be /data/local/tmp.
BTW:
I can see BusyBox is installed on your device's Android. Take note that BusyBox by default comes with the SU-binary. Hence your device's Android is rooted! Wondering why you waste your time with trying to completely install SuperSU from scratch?
jwoegerbauer said:
Wondering why you waste your time with trying to completely install SuperSU from scratch?
Click to expand...
Click to collapse
Good question.
Probably, because I see this when phone restarts from recovery to normal android:
jwoegerbauer said:
Also, believe me, it makes sense to repack original SuperSU.zip to SuperSu.tar as I demonstrated above.
Click to expand...
Click to collapse
OK, no problem, I can re-pack zip into tar.
However, what you demonstrated above was a screenshot showing update-binary.sh being inside the tar. At the same time you don't tell how update-binary.sh must be amended. Is it OK?
TexasPride​
I'm very sorry I put so much spam in your thread. Please forgive me. If I knew how to delete my posts here I would deleted them.
vp1117 said:
TexasPride​
I'm very sorry I put so much spam in your thread. Please forgive me. If I knew how to delete my posts here I would deleted them.
Click to expand...
Click to collapse
Its ok, i dont mind at all.
@TexasPride
FYI: I no longer participate this hijacked thread.

How can I install a ROM on my phone via ADB from a custom recovery?

My phone's LCD touchscreen is broken and the phone seems stuck in bootloop. I have access to a custom recovery (OrangeFox is installed, but I should be able to `fastboot boot` into any other).
I have read on this reddit post that it should be possible to flash a new ROM, push my computer's ADB public key to it, boot it and use `scrcpy` to control my phone.
However I'm stuck on the first step: how can I flash a new ROM to my phone via command line from OrangeFox or other recoveries?
You can't flash a Custom ROM via ADB, you've to do this via FASTBOOT or Custom Recovery.
xXx yYy said:
You can't flash a Custom ROM via ADB, you've to do this via FASTBOOT or Custom Recovery.
Click to expand...
Click to collapse
Yes, when I said "ADB", I meant the ADB of a Custom Recovery. I can boot into OrangeFox and then `adb shell` into it. I'm wondering how to install a ROM from there.
Installing the ROM from Fastboot would work too, if it's simpler.
TWRP uses dd to flash raw images and tar + gzip to backup/restore userdata partition. It's all done with shell scripting and adb shell is nearly the same.
@peoro The custom rom zip archive is build as OTA update.zip and either has a payload.bin (A/B slots) or *.dat.br compressed images for A-only devices. Both can be unpacked to get the raw images. Those images can be flashed via ADB or via fastboot.
peoro said:
Yes, when I said "ADB", I meant the ADB of a Custom Recovery. I can boot into OrangeFox and then `adb shell` into it. I'm wondering how to install a ROM from there.
Installing the ROM from Fastboot would work too, if it's simpler.
Click to expand...
Click to collapse
Don't confuse things:
Code:
adb shell
is used to run Android ( Linux ) system commands on Android devices.
WoKoschekk said:
@peoro The custom rom zip archive is build as OTA update.zip and either has a payload.bin (A/B slots) or *.dat.br compressed images for A-only devices. Both can be unpacked to get the raw images. Those images can be flashed via ADB or via fastboot.
Click to expand...
Click to collapse
Thank you for the replies. My phone is A-only (it's a Poco X3 Pro).
I just downloaded a new ROM (the latest crDroid 12 for my device) and I could find a number of `.dat.br` files in its zip:
Code:
$ unzip -Z1 crDroidAndroid-12.1-20230106-vayu-v8.12.zip | grep '.dat.br$'
odm.new.dat.br
product.new.dat.br
system.new.dat.br
system_ext.new.dat.br
vendor.new.dat.br
However I'm not sure where or how to flash these files and what other commands I need to use to e.g. format the various partitions or whatever is needed.
OrangeFox offers a `fox` command line tool (I believe it's a fork of TRWP's command). I believe it should help me with all of this, but I'm too much of a noob to know what to do and how.
Would you know where to find a good guide about installing a ROM via command line?
Otherwise could you tell me what commands I'm supposed to run and/or what operations I'm supposed to do?
I know my way around Linux pretty well, can write and read bash, but am a complete noob for anything related to android. Don't even know what the various partitions are, how they map to the contents of the drive and in general how the boot process works...
xXx yYy said:
Don't confuse things:
Code:
adb shell
is used to run Android ( Linux ) system commands on Android devices.
Click to expand...
Click to collapse
Yeah. ADB gives me access to a shell on the phone. I can have a shell while the phone is in the Custom Recovery (OrangeFox, currently) and I believe I should be able to flash a new ROM from there. That's what I'm trying to do.
Any way to install a new ROM would work for me: `dd`, the `fox` command line tool, or fastboot.
I'm good with bash, but don't know much at all about Android's internals. But I'd love to find a noob-friendly guide on how to flash to a ROM using whatever tool.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
xXx yYy said:
Click to expand...
Click to collapse
​Which part?
While my phone is running a custom recovery (OrangeFox, TWRP, whatever), that recovery is able to flash a new ROM. It offers a UI to do so. Right? I can't use the UI, but can run anything on the recovery, via the shell opened by ADB.
Am I saying anything wrong?
I have access both to `fastboot` and to the shell of a running custom recovery. But I don't know how to install the ROM (the content of crDroidAndroid-12.1-20230106-vayu-v8.12.zip ) with either tool, without using the custom recovery's UI.
peoro said:
I have read on this reddit post that it should be possible to flash a new ROM, push my computer's ADB public key to it, boot it and use `scrcpy` to control my phone.
Click to expand...
Click to collapse
The tool scrcpy installs *.odex compiled Java code on your device. This code isn't executable in any recovery.
Options for flashing your ROM:
– TWRP:
1. Put the raw images of your custom ROM into the ADB folder on your desktop and adb push them to the phone or use MTP to copy them.
2. Then you can use the openrecoveryscript.html (TWRP's commandline tool) to flash images.
TWRP Commandline Guide
</style>CLIENT SIDE/SCRIPTinstall FILENAME : install FILENAME zip file.
twrp.me
– ADB:
1. copy all raw images into ADB folder
2. use adb push to flash the images on your device.
– ABD (adb shell):
1. copy all images via adb push or via MTP to your device
2. enter the device's shell with adb shell
3. You said you are familiar with bash scripting. Do you know the dd command and its syntax?
CAUTION: The command dd overwrites EVERYTHING and without a warning!! Be careful and only use it if you know what you're doing.
Creating RAW images:
You need this tool to convert *.dat.br to raw image.
Flash custom ROM via fastboot:
1. convert the *.dat.br to RAW images.
*.dat.br files​RAW images​partition​odm.new.dat.br​odm.img​odm​product.new.dat.br​product.img​product​system.new.dat.br​system.img​system​system_ext.new.dat.br​system_ext.img​system_ext​vendor.new.dat.br​vendor.img​vendor​
2. Use command
Code:
fastboot flash PARTITION RAW_IMAGE
to flash them all.
xXx yYy said:
Don't confuse things:
Code:
adb shell
is used to run Android ( Linux ) system commands on Android devices.
Click to expand...
Click to collapse
Using ADB commands or adb shell to run commands in the device's shell (#!/system/bin/sh) doesn't matter. Both passing commands through adb.exe to the adbd on the device. Killing the adbd will kill the connection anywhere.
You must NOT teach me what ADB is and/or how it works.
WoKoschekk said:
The tool scrcpy installs *.odex compiled Java code on your device. This code isn't executable in any recovery.
Options for flashing your ROM:
– TWRP:
1. Put the raw images of your custom ROM into the ADB folder on your desktop and adb push them to the phone or use MTP to copy them.
2. Then you can use the openrecoveryscript.html (TWRP's commandline tool) to flash images.
TWRP Commandline Guide
</style>CLIENT SIDE/SCRIPTinstall FILENAME : install FILENAME zip file.
twrp.me
– ADB:
1. copy all raw images into ADB folder
2. use adb push to flash the images on your device.
– ABD (adb shell):
1. copy all images via adb push or via MTP to your device
2. enter the device's shell with adb shell
3. You said you are familiar with bash scripting. Do you know the dd command and its syntax?
CAUTION: The command dd overwrites EVERYTHING and without a warning!! Be careful and only use it if you know what you're doing.
Click to expand...
Click to collapse
Thank you a lot for the detailed answer.
I used the TWRP approach as it seems the simpler.
I know `dd` and can read its man, but I'd rather not mess with the phone's partitions and block devices, unless it could result in a different outcome than using the `twrp` tool.
I tried to install two different ROMs (Lineage and crDroid), but neither manages to boot.
I can see that the few visible pixels on the broken LCD are in different colors for the two ROMs (so it did manage to install something), but neither ROM ever reaches a point where the power button turns the monitor on or off: they're both stuck on the bootloader.
What I did is basically this:
Bash:
$ twrp wite cache
$ twrp wipe system
$ twrp install $ROM.zip
$ twrp format data
$ twrp wipe dalvik
$ twrp wipe cache
$ reboot
If that's a correct way to install a ROM, then I guess I have my answer: some of my phone's hardware is broken
peoro said:
What I did is basically this:
Bash:
Click to expand...
Click to collapse
Use the adb sideload option to flash your ROM. That's the usual way to install it.
Code:
adb shell twrp sideload # to activate the process on client
adb sideload <ROM_PACKAGE> # to activate the process on host
Flashing starts automatically.
xXx yYy said:
You must NOT teach me what ADB is and/or how it works.
Click to expand...
Click to collapse
I'm not teaching. I just gave arguments.
peoro said:
If that's a correct way to install a ROM,
Click to expand...
Click to collapse
Yes, it's the correct way to install. All you need to wipe/format is data.
peoro said:
I tried to install two different ROMs (Lineage and crDroid), but neither manages to boot.
Click to expand...
Click to collapse
Seems you already found the solution yourself
How do you know the ROM does not boot? note first boot takes up to 10 minutes.
alecxs said:
Seems you already found the solution yourself
How do you know the ROM does not boot? note first boot takes up to 10 minutes.
Click to expand...
Click to collapse
When the screen broke, I could tell that the ROM didn't work, because:
1. My phone didn't connect to my router. I can tell by looking at the router's log or at internet services that tell me the last time the device was online.
2. If I try to call or send SMS to SIM on the phone, the phone doesn't ring or vibrate.
3. The screen never turns off. Not even when I press the power button.
All those points still hold with the newly flashed ROM too. Of course now it can't connect to anything, but it still doesn't react to incoming calls or to the power button.
I can kinda see from the glitchy colors on the bottom of the broken LCD that the bootloader animation is displayed, but it seems that it's stuck there...
If you have any ideas on how to debug this, I'm very interested.
This is a dump of `dmesg` (from the custom recovery). It shows a bunch of errors, but I can't tell whether any is about real hardware issues.

Categories

Resources