[TUTORIAL LINUX]flash TWRP onto Mediapad 7 Lite - Huawei MediaPad, T-Mobile SpringBoard

Introduction
Try at own risk
I am a Linux user. Commands are Debian or Ubuntu so you may need to check your package manager for
Linux software for adb if different distro.
If you do not have sudo enabled, then use su - please
On tablet, I use "reboot" by Petrus, as recommended by pogs24ever
I have also installed app= adbd insecure........YMMV
Know that when TWRP is used on removeable sdcard = /sdcard2, you will have a folder
called TWRP so I prefer to rename my image as twrp.img
Credits
Vampirefo for his wonderful help with adb and root id test
pogs24ever for his XDA post for TWRP
AbduL_PT for TWRP for Rockchip
Method
SPOILERS= Click to show content ..... hides images only
Ensure your device is rooted.
{
"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"
}
If your method to root is failing try my method here.
http://forum.xda-developers.com/hua...t-huawei-mediapad-7-lite-alternative-t2996675
On tablet go to system settings and enable USB debugging.
Don't worry about setting media transfer, camera or Hisuite
Download and unpack the TWRP* zip to PC and copy TWRP.img to your home folder.
See Original post for latest download
http://forum.xda-developers.com/showthread.php?t=2693100
Latest download is found at
"Dowload the zip file to this"
Install latest adb to Linux PC
Code:
sudo su
apt-get update
apt-get install android-tools-adb
Do NOT close terminal please
Create udev rule if you don't yet have Huawei mentioned in your rules
Code:
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="666", GROUP="plugdev" ' > /etc/udev/rules.d/55-huawei.rules
Refresh udev for distros running "service" such as distros like Ubuntu with next command or
bottom line for distros not running service like Debian.
Code:
service udev restart
udevadm control --reload-rules
Now open terminal as local user please.
I prefer to kill the server and restart it with
Code:
adb kill-server
adb devices
If you do not get a device showing a serial number, you can NOT continue.
Recheck you have enabled USB debugging, kill the server and retry adb devices command.
If you are not sure what device your recovery is on, recheck it please with
Code:
adb shell cat /proc/mtd | grep recovery
Now we need to translate that into a device which is /dev/mtd/mtd3
Now we can flash with
Code:
adb push TWRP.img /sdcard2/twrp.img
# above line copies TWRP to removeable sdcard, change sdcard2 if you
don't use one please.
adb shell su -c "dd if=/sdcard2/twrp.img of=/dev/mtd/mtd3"
adb kill-server
Second last command may fail if you don't yet have a rooted device
also if size of bytes of TWRP image is wrong, recheck it please.
6717440 bytes = 6560 Kb = 6.41 Mb which is far less than max size of recovery image.
Before you test, ensure you have a backup of current recovery on removeable sdcard please.
Now use app to reboot into recovery to test.

Nice.. Hope you can find time to port some Cm rom for this.. I stop digging for this device for sometime now.. We have manage to boot on cm9 but it goes bootloop due to kernel compatibility ..

pogs24ever
I have not attempted to port anything yet. Feel free to pm or post here any links you would like me to look at please.
nor have I attempted to cross compile a kernel for this device but I can see Huawei appear to have source here
http://consumer.huawei.com/en/support/downloads/detail/index.htm?id=18334
cheers

just to make it clear in case others drop by via google
this is the mediapad with model showing as S7-931W
and
ro.product.device=hws7930w
2) you can use huawei and 7930 to see one entrant here
https://www.otaupdatecenter.pro/device-lookup
good luck

Related

[Driver] PureDriver STS R5A ADB Recovery Custom Driver

While in the Sony Tablet Bootloader Discussion I have created a R5A ADB Recovery Driver.
This will overwrite your Sony Tablet S ADB driver.
This does support x86 and x64.
Please note that the recovery is going to disallow most if not some adb commands, I created this so people can access the recovery with the new recovery address via ADB, hopefully someone would be able to bypass and hack the recovery using this.
This uses the ADB from the system so it is ok to install.
EDIT: I was really suppose to use adb install to install an application.
EDIT 2: Sideload just throws back an error, I have not tested ADB install and I doubt that would work.
Screeny of the commands that would work if I had a flashable zip file and also if the recovery allowed such thing:
{
"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"
}
Download and Installation instructions here: http://caftp.pcsat.tv/drivers/puredriver_sts_r5a_adb
andyabc said:
While in the Sony Tablet Bootloader Discussion I have created a R5A ADB Recovery Driver.
This will overwrite your Sony Tablet S ADB driver.
This does support x86 and x64.
Please note that the recovery is going to disallow most if not some adb commands, I created this so people can access the recovery with the new recovery address via ADB, hopefully someone would be able to bypass and hack the recovery using this.
This uses the ADB from the system so it is ok to install.
EDIT: I was really suppose to use adb install to install an application.
EDIT 2: Sideload just throws back an error, I have not tested ADB install and I doubt that would work.
Screeny of the commands that would work if I had a flashable zip file and also if the recovery allowed such thing:
Download and Installation instructions here: http://caftp.3owl.com/Drivers/PureDriver_STS_R5A_ADB/
Click to expand...
Click to collapse
says install method not supported for this type of file. I was hoping to use this to allow flashing on my soft brick tab that I just can't seem to get going again.
jamminjon82 said:
says install method not supported for this type of file. I was hoping to use this to allow flashing on my soft brick tab that I just can't seem to get going again.
Click to expand...
Click to collapse
Yeah the install command is just for installing applications...
Sent from my Nexus 4 using Tapatalk 4
Can we run adb shell and “ dump_image boot /sdcard/boot.img “ to port CWM
Plays2 said:
Can we run adb shell and “ dump_image boot /sdcard/boot.img “ to port CWM
Click to expand...
Click to collapse
Nope, unfortunately Sony did block most of the ADB commands and I assume it is blocked with either ADB unlock code or some file which is required to unlock the commands.
Sent from my Nexus 4 using Tapatalk 4

HTC Incredible 4GLTE-Going back to stock 4 noobs & after update(4 EASY Steps)05/21/14

HTC Incredible 4GLTE-Going back to stock 4 noobs & after update(4 EASY Steps)05/21/14
{
"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"
}
--->DO NOT DO THE STEPS OUT OF ORDER, YOU MAY BRICK YOUR DEVICE IF YOU DO.<---
--->YOU HAVE BEEN WARNED!<---​​
If you follow this step by step, you will be back to stock s-on, locked bootloader and stock rom.
Note: This will work with ANY windows, for thoses having windows 8 issues.
Files needed:
HTC Drivers (THanks to mdmower for hosting): http://forum.xda-developers.com/showthread.php?t=2089508
Automated Unlock/SuperCID/Temp-Root scripts for Windows and Linux(Thanks to mdmower):
http://forum.xda-developers.com/showthread.php?t=2214653
Stock RUU (THANKS TO androidfilehost: http://www.androidruu.com/getdownlo...919_NV_VZW_2.63_002_release_283671_signed.exe
-----------------------------------------------
Required:
S-off!
Unlocked bootloader
CID: 111111
-----------------------------------------------
Okay, so I had a heck of a time returning to stock with the latest updated bootloader.
So, I decided to make a back to stock for noobs.
First, you will need to download the two files above.
Next, disable any antivirus. (AVG was blocking me from running the script)​
1) Reverting CID:​
Click start, run
Type CMD, enter
type cd and paste the location of the unzip folder.
(Note: I had issues with the script running, this will be a windows 8 fix also)
Exp: cd C:\Users\Home\Inc4GUnlockV61-Windows
Next, connect your device and make sure android debugging is running and stay awake is checked mark.
Plus, make sure your device stays unlocked!
Run the following (copy and paste):
adb shell "su -c 'id'" > su_check.log 2>&1
find.exe "uid=0(root)" su_check.log > NUL
adb shell "su -c 'dd if=/dev/block/mmcblk0p4 of=/sdcard/cid'"
adb pull /sdcard/cid
hexalter cid 0x214=0x56,0x5A,0x57,0x5F,0x5F,0x30,0x30,0x31 > NUL
adb push cid /sdcard/
adb shell "su -c 'dd if=/sdcard/cid of=/dev/block/mmcblk0p4'"
adb shell "rm /sdcard/cid"
del cid
adb reboot bootloader
--------------------------------------------------------------------------
Now, check to make sure your back to VZW_001.
If so, reboot device.
Image of commands in CMD:
--------------------------------------------------------------------------​
2) Next (Going back to stock):​
Unlock device
Run RUU and follow steps with your phone connected.
Screen Shots:
----------DONE BACK TO STOCK ----------
​
3) Next (S-on) (THANKS TO andybones for the script):​
Turn on debugging after stock reboot!!!
Go here and run the commands:
http://forum.xda-developers.com/showthread.php?t=2031190
(Just use the same CMD you had opened.)
Script:
adb devices
adb reboot bootloader
fastboot devices
fastboot oem writesecureflag 3
fastboot reboot-bootloader
-----------------------------------
Verify you are locked s-on
-----------------------------------
Run command:
fastboot reboot
Screen Shot:
4) Finally (Relock bootloader):​
Run these commands:
adb reboot bootloader
fastboot oem lock
-------------------------
After Reboot run:
-------------------------
adb reboot bootloader
------------------------
Should be relocked!
Screen Shot:
------------------------​
Your all done, back to stock and all.​
Thanks again to:
andybones (S-on Script)
mdmower (Tool & Scripts)
androidfilehost (Hosting the Stock RUU's)​
Thanks for this guide. It's been a while since I've done anything in going back to stock on an HTC device, and I had a $200 promo for any smart phone trade in, and this phone has been lying around collecting dust for 2 years.
Just one quick edit that I would suggest. In step 1, if the CID is already set at VZW_001, the step can be skipped. You can check if you've got the proper CID set in the adb shell with su permissions by running the command getprop ro.cid.

Creating a android dump file using ADB

Hello,
I am trying create a disk image on my windows PC of the data on my phone to see if I can recover some lost files.
On my PC, can I just use:
~# adb shell dd if=/dev/block/datapartition > data.img
or just
~# adb pull /dev/block/datapartition data.img
or do I need to use netcat and busybox to send and receive the files?
Do all these methods work exactly the same?
Thanks
just type the following on ADB
Code:
adb devices
Code:
adb shell
Code:
ls -la /dev/block/bootdevice/by-name
^ this would list all partion of your devices it should look like this
{
"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"
}
based on the screenshot above we know boot.img is mmcblk0p59
now we just do dd command
Code:
dd if=/dev/block/mmcblk0p59 of=/sdcard/boot.img
Congratulation you now have boot.img backup of your device :fingers-crossed::fingers-crossed:
Thanks, but will that output to the phones sd card? I would like to output the img to my pc
kaotik123 said:
Thanks, but will that output to the phones sd card? I would like to output the img to my pc
Click to expand...
Click to collapse
you are most likely do the dd command from your pc just copy the img file from your device to your pc
also on my device even it say " of=/sdcard/ " files are being drop on Internal Memory ...
ineedroot69 said:
you are most likely do the dd command from your pc just copy the img file from your device to your pc
also on my device even it say " of=/sdcard/ " files are being drop on Internal Memory ...
Click to expand...
Click to collapse
Yeah I wanted to avoid writing to the phone's memory becuase I was trying to recover lost files from it. Plus the image would be too big to fit on the remaining memory anyway. Thanks for your help but I used netcat and busybox and successfully copied the image directly to my PC. Followed the tutorial here for anyone else reading this and was quite easy: https://dfir.science/2017/04/Imaging-Android-with-root-netcat-and-dd.html (second video for windows pc).

Deleted all Bootable & Other partitions, how to connect mobile?

I wanted to upgrade from android 9 to android 10.
Adb and fastboot were installed. The phone was enabled with USB Developermode and OEM change mode.
I entered the following commands;
# adb devices (then I saw my phone)
# fastboot devices
and then
# fastboot flash boot twrp-3.4.0-0-twrp.img
After that, "something" was left on the screen in small print that could not be read .... then I pressed the power button until the image disappeared and nothing happened.
After that, the phone can no longer be connected to the computer. The computer will no longer see the phone when im enter the command
# adb devices
My phone is CUBOT P30 ...Is it possible to restore or throw it straight in the trash!
SORRY my bad english.
@IFFI76
As long as you can interact with phone's bootloader you should be able to re-flash phone's Stock ROM.
The related command sequence would be
Code:
fastboot devices
fastboot flash-all <PATH_TO_STOCK_ROM_IMAGE>
fastboot reboot
Thank you for answering!
I don't understand exactly what you mean now!?
I personally believe I can't communicate with the bootloader...
I use debian distro and this is the output of my terminal;
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools# adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools# adb devices
List of devices attached
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools#
indicates that the device list is empty!
@IFFI76
Wondering why you stubbornly want to make an ADB connection, what in your case is absolutely pointless? Check whether you can establish a Fastboot connection.
Okay, I tried to do that now
I connected the mobile phone to the computer via usb and then below is the output of my terminal.
[email protected]:~
$ cd /home/iffi/Downloads/ADB-fastboot/platform-tools/
[email protected]:~/Downloads/ADB-fastboot/platform-tools
$ fastboot devices
[email protected]:~/Downloads/ADB-fastboot/platform-tools
$ sudo su
[sudo] password for iffi:
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools# fastboot devices
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools#
Looks like I can't connect to my phone and the bootloader is DELETED!
PLATFORM-TOOLS the contents of the directory are as follows
{
"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"
}
I suppose your phone became e-waste.

General Extend WSA by 428 Linux commands

To my knowledge Windows Subsystem for Android ( WSA ) is not created to run apps from the Amazon store only, but is configured for testing via ADB, will say run Linux commands in an Android shell, too.
WSA ( what at time of this writing is running Android 12 ) has merged Landley's Toybox v0.8.4, a bag of over 200 Linux command line applets - I have not really counted them.
A typical Linux distribution provides 428 command line applets - the SU incorporated. I have uploaded .ZIP ( 263 MB ) what contains them all here to:
428-cmds
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
If you are interested in this project, too, then it's on you to download and extract the .ZIP and push the 428 files onto Android, preferredly to /storage/emulated/0/428-cmds, and make them executable.
Example .BAT-file - assumed .ZIP got extracted into D:\428-cmds folder & ADB is installed on PC
Code:
adb connect 127.0.0.1:58526
adb devices
adb shell "cd /sdcard & mkdir -p -m06755 428-cmds 2>/dev/null"
adb push "D:\428-cmds" "/sdcard/428-cmds/"
adb shell "SM='getenforce';setenforce 0;cd /sdcard/428-cmds;CMDS='$(find .-name "*" -maxdepth 1 -type f 2>&1 | grep -i -v denied)';while read x;do chmod 06755 "$x" & chown root:shell "$x";done; << "$CMDS";chcon "$x" u:object_r:su_exec:s0;setenforce "$SM";"
{
"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"
}
Note:
The 428 commands provided all are ELF32 binaries, so 32-bit:
That doesn't have to stop you from using them on a x86_64 PC because a 64-bit CPU can handle 32-bit commands.
Hmm... Great Work
I am getting an error on the last command.
/system/bin/sh: here document '$CMDS' unclosed
I tried the method in your toybox thread but it doesn't connect to wsa.
I think it is looking on the wrong port from the looks of the script. I am just trying to get root. I updated my rooted build of wsa and it no longer would load. i have tried different ones making sure to remove the one from the microsoft store first. Installing the one from the microsoft store by installing the amazon store gets wsa working again but without root and without my userdata.vhdx that I backed up. Any help would be appreciated. Thanks

Categories

Resources