Getting adb root with only a USER boot.img - Android Q&A, Help & Troubleshooting

Hi There
So, I normally obtain adb root by the following process:
1. Unlock the Bootloader (if required)
2. Use fastboot to OEM unlock the boot loader
3. Get the boot.img and upack it
4. Change ro.secure=0 and ro.debbugable=1 in default.prop
5. repack boot.img
6. flash boot.img to device
7. Boot up device, ensure USB debugging is enable.
8. Then use adb root, adb remount rw and I usually always get adb root this way. So I can "adb shell" and I have a # root prompt.
However I think I have always had the ENG or DEBUG builds of the OS when I did this.
So I now only have a USER build of the OS.
I follow the above procedure but it doesn't matter how many times I change the ro.secure and ro.debggable settings , they are always locked. They must be being set somewhere else?
So I heard that this is normal for USER builds, the build simply does not allow access to ro.secure=0.
My questions are:
1. Is what do I need to change in the USER build of my OS or boot.img to get ro.secure=0 working?
2. Is it even possible?
3. Failing this, can you get generic DEBUG/ENG boot.img's for MTK 6755 devices?

Related

Eris 2.1

Been working on a phone with the build number
2.19.605.1
CL123435 test-keys
Cannot get this to take a custom recovery, It seems to have root in ADB but when I try to flash a recovery it fails.
Any advice?
which method are you using?
I would suggest the fastboot method its a lot easier to do.
Just make sure recovery.img is in the tools directory. Then just follow these directions if you don't have windows just look for fastboot.bin and compile it in linux and it should work.
Code:
WINDOWS USERS
From your tools directory in the sdk do the following command
adb reboot bootloader
You will have FASTBOOT highlighted in red like it is here
Now on your computer do the following
Fastboot flash recovery recovery.img
you should see "sending....ok" then "writing.....ok"
on your command prompt when its done just do
fastboot reboot
that will reboot your phone and then you can either turn it off and reboot
into recovery or run
adb reboot recovery
from the command prompt.
BTW: all commands are run from command prompt.
Hope this helps.

[Q] How to root and unlock BL on MAC OSX

Im using MAC OSX, so i've only use SEUS. So how can i get root for my NEO and unlock BL???
sorry for my bad ENG
I did unlock my bootloader and rooted my neo using a linux system. Never used windows. So I suppose it would be possible to do the same with osx.
For unlocking BL use this http://unlockbootloader.sonymobile.com/instructions
You would need android sdk and run fastboot from there.
For rooting I suggest you look here: http://forum.xda-developers.com/showthread.php?t=1468866
Good luck!
I used S1Tool to unlock bootloader and I think it is only in Windows.
If you use the official method (http://unlockbootloader.sonymobile.com/instructions) using fastboot, I assume you can do that on Mac, try this? http://blog.wapnet.nl/2011/05/setup-adb-and-fastboot-with-android-sdk-on-mac-osx/
If you unlocked the bootloader, it is far more simple to root, just boot into CWM using recoveryNeo.img.
http://forum.xda-developers.com/showthread.php?t=1183465
I used the files in here: http://androidsu.com/superuser/
1) Extract and copy `su` and `Superuser.apk` out.
2) Boot into fastboot (hold menu while plug in usb).
3) On computer type `fastboot boot recoveryNeo.img`.
4) Wait till CWM is loaded.
5) Go to Mounts and Storage and mount system.
6) On computer, type `adb devices` to make sure it is connected (You may need SE's driver)...
Code:
adb push su /system/bin
adb shell chmod 6755 /system/bin/su
adb shell ln /system/bin/su /system/xbin/su
adb push Superuser.apk /system/app
7) Reboot system.

How to fix Android boot loop, ADB?

My android (jellybean) tablet was turned off in middle of update and now is in boot loop. It was rooted with USB debugging on.
I MUST recover files (PDFs, .doc, .wav .JPEG, etc ) without erasing them.
Questions:
1 Do I use Odin and TWRP together?
2 Will Odin flash Samsung stock firmware erase files on device?
3. Will TWRP .img file erase everything?
4. Are these instructions correct?
I recommend you install TWRP recovery. It's the most feature-rich of all the recoveries I have used, and I will be assuming that is the recovery you use for the rest of this.
1. Boot into TWRP. (how? TWRP is an .img file )
2. Push your ADB public key to your device to force authentication.
____On Windows, do: adb push %UserProfile%\.android\ad
bkey.pub /data/misc/adb/adb_keys
3. Reboot into Android. Try adb shell and see if you get a shell prompt. If so, great! Exit it and run adb logcat, and read the huge error log for problems. If you didn't get the shell, well, then I think you're screwed, unless someone has cooked up a recovery zip for enabling adb.
What happens after ADB logcat?
Thank you..

[ROM][7.0] Maze Alpha V05_20170816 [STOCK]

Maze has finally published the Alpha Stock-Rom.
Download Link: https://goo.gl/9kCJiv :fingers-crossed:
The system.img file is incorrectly downloaded as a system 002.img file. It must be renamed. And then copy it to the folder "3. Maze_Alpha_V05_20170816 Official ROM".
Thanks!
Hope anyone can root this phone.
Hi!
I am in need of a new phone, and this one looks quite good at the price.. But what do you think can i expect from custom ROM scene here for it? I am a Xiaomi Fan, and my Mi4 was and is one of the best supported phones still. Do you think there will be a subforum for this device, custom ROMs (preferreable Lineage OS, or other close to AOSP ROMs? OFC nobody can know now, i understand, but what tells your experience of other new phones from new companys? It has created quite a buzz, so i think there will be a demand for sure..
Just am 2 afraid to get a phone without good custom ROM. Never had an Android in last 5 years with stock ROM. Total nightmare for me now to have to go back.
Root + TWRP 3.2.1
3 Methods to root MAZE Alpha
Note: Method II is the most universal and must works with almost any official ROM
I- Method 1 : flashing modified Magisk boot.img
1. make sure to have already installed the version 20170816
2. reboot the phone in fastboot mode (phone off -> Vol Up + Power or "adb reboot bootloader")
3. unlock the bootloader if not already done : fastboot flashing unlock (if not works, in android development setting set the unlock bootloader and then retry)
4. unzip and then flash the attached boot image : fastboot flash boot new-boot.img
5. reboot your phone: fastboot reboot
6. install the MagiskManager apk v14
7. Voila
I have used this Magisk guide to create it
I used old manual guide :
Code:
adb shell "rm -rf /data/local/tmp/*"
adb push META-INF/com/google/android/update-binary common magisk_inject boot.img /data/local/tmp
adb shell "cd /data/local/tmp/magisk_inject; mv ../common/* .; chmod 755 *; sh ../update-binary indep boot_patch.sh ../boot.img; mv ../bin/busybox busybox"
adb pull /data/local/tmp/magisk_inject/new-boot.img
adb shell "rm -rf /data/local/tmp/*"
II- Method 2 : using TWRP and Magisk.zip (External SDCARD or USB OTG cable needed)
1. reboot int bootloader mode : adb reboot bootloader
2. unzip and flash the the attached TWRP recovery : fastboot flash recovery recovery_maze_alpha_4G_twrp-321.img
3. In TWRP choose first "change language" then press the "cancel" button while asking you for decryption password for data
4. In your PC download the Magisk-v15.3.zip and put it in a USB key, or an SDCARD
5. Use an usb otg cable to connect the USB key to your phone running TWRP and install the Magisk-v14.zip from Usb-otg (or SDCARD)
6. bonus: do a complete backup of your phone : all partitions except cache and data to your Usb-otg (or SDCARD)
7. reboot and install the MagiskManager apk v14
III- Method 3 : using the phhusson modified boot image
1- flash the attached boot image, using fasboot (fastboot flash boot boot-super-bootimg-output-su-eng-r318.img) or SPFlashTools using the attached scatter, if you do not want to unlock your bootloader
2- reboot to Android then install from google play the phhsusson superuser
3- Voila
Important Notes:
1- In all case you can use SPFlashTools to flash boot image without unlocking bootloader.
2- windows SPFlashTools users : phone off, press VOL+ and connect it to your PC (running SPFlashTool and waiting for phone connetion)
3- linux SPFlashTools users : phone off and connected to PC , press VOL+ and POWER while your PC is running SPFlashTool (with sudo) and waiting for phone connetion.
Some useful tips
1- manual install of busybox :
a- root you phone with method II if not already done
b- stay in TWRP (or boot TWRP as in method II) then in advance->sideload slide the slider to confirm and after cancel that (we will not sideloading any thing, just to activate adb)
c- unzip and copy the attached busybox : adb push busybox /external_sd/
d- mount the system partition with the TWRP mount button
e- copy the busybox binary to /system/xbin : adb shell --> cp /external_sd/busybox /system/xbin/
f- make executable busybox and create links (the point at the end is a part of the command) : cd /system/xbin/; chmod 755 busybox; ./busybox --install -s .
g- umount the system partition in TWRP and reboot
2- manually install the OTA update.zip :
a- Google and download those 3 tools BlockImageUpdate, simg2img and img2simg.
b- In a terminal of your Linux PC do :
Code:
simg2img system.img system.raw.img # convert the sparse image to a normal raw (ext4) image
BlockImageUpdate system.raw.img system.transfer.list system.new.dat system.patch.dat # patch the newly created raw image
img2simg system.raw.img system.img # convert the patched raw image to a flashable sparse image
- system.img: you old system image (from 20170816 official rom)
- system.transfer.list, system.new.dat and system.patch.dat : inside the OTA update.zip
c- After that the original system.img will be patched and you will have an updated system.img.
d- Flash this patched system.img and also all .bin and .img files inside the update.zip (just replace old ones in the original 20170816 rom by those) and you will have the new official rom
3- Using supersu as root manager :
The last update at this time of supersu zip (2.82 SR5) works well, even it cannot update the su binary.
Credits to Magisk Devs, Phhusson and Jemmini
dreambo said:
Here how to root this phone.
1. make sure to have already installed the version 20170816
2. reboot the phone in fastboot mode (phone off -> Vol Up + Power or "adb reboot bootloader")
3. unlock the bootloader if not already done : fastboot flashing unlock (if not works, in android development setting set the unlock bootloader and then retry)
4. unzip and then flash the attached boot image : fastboot flash boot new-boot.img
5. reboot your phone: fastboot reboot
6. install the MagiskManager apk v13.6
7. Voila
I have used this Magisk guide to create it
Credits to Magisk Devs.
Click to expand...
Click to collapse
If I root my phone with this method, will I get further OTA Updates from Maze?
Following to see where this goes.
Cheers
CrashCrash123 said:
If I root my phone with this method, will I get further OTA Updates from Maze?
Click to expand...
Click to collapse
Yes.
You will only lost the root.
If the new update have the same kernel, the same methode with the same boot image can be used to root it again, othewise, we can follow the Magisk guide to create a new one.
I have tried this method. But it only works until the reboot. Then the root access is gone again.
SomeOneX said:
I have tried this method. But it only works until the reboot. Then the root access is gone again.
Click to expand...
Click to collapse
The root is permanent.
If you lost it, perhaps the first time we unlock the bootloader, the phone do a reset, and we lost the root (I suppose).
Just re-flash the new boot again, and it will be permanent : fastboot flash boot new-boot.img
Hi . I have locked the OEM lock but I can not install it through fastboot (remote: not allowed in lock state)
can we expect VOLTE on this device ?
and is there any chance of custom rom development for this device?
alfymon22 said:
can we expect VOLTE on this device ?
and is there any chance of custom rom development for this device?
Click to expand...
Click to collapse
It seems (take with a pinch of salt) that VoLTE is supported, but then most sites that announce that also make mistakes on other specs, so...)
As for custom ROMs, so far the square root of bugger all, but the consumer phones are just filtering in, so give it time.
dreambo said:
Here how to root this phone.
1. make sure to have already installed the version 20170816
2. reboot the phone in fastboot mode (phone off -> Vol Up + Power or "adb reboot bootloader")
3. unlock the bootloader if not already done : fastboot flashing unlock (if not works, in android development setting set the unlock bootloader and then retry)
4. unzip and then flash the attached boot image : fastboot flash boot new-boot.img
5. reboot your phone: fastboot reboot
6. install the MagiskManager apk v13.6
7. Voila
I have used this Magisk guide to create it
Credits to Magisk Devs.
Click to expand...
Click to collapse
it worked, but i have cts fail on safetynet check. how you fixed this?
PrimateaEu said:
it worked, but i have cts fail on safetynet check. how you fixed this?
Click to expand...
Click to collapse
install the universal safety net fix
Hey guys, does this root method wipe the data partition?
KilljoyTDA said:
Hey guys, does this root method wipe the data partition?
Click to expand...
Click to collapse
The flash of the boot image does not wipe the data, but unlocking the bootloader reset the phone and wipe the data.
If you phone is already unlocked, you will not loss the data, otherwise do a backup before.
Well, I don't remember unlocking it, unless Kingo's windows app does it without telling even when rooting fails, so I guess I'd better back up.
Thanks for the info
KilljoyTDA said:
Well, I don't remember unlocking it, unless Kingo's windows app does it without telling even when rooting fails, so I guess I'd better back up.
Thanks for the info
Click to expand...
Click to collapse
It is easy to know if your phone is locked or not : enter fastboot mode and then do : "fastboot getvar all".
Read the last lines of the output and you will know.
Thank you @dreambo for this method, but for me "fastboot flashing unlock" not work, "fastboot oem unlock" working for me, all ok
ps:excusez moi pour mon anglais
dreambo said:
It is easy to know if your phone is locked or not : enter fastboot mode and then do : "fastboot getvar all".
Read the last lines of the output and you will know.
Click to expand...
Click to collapse
Well I failed to back up for some reason anyways, so since I had almost nothing vital on the internal memory, I rooted (sucessfully) and now I'm reinstalling/reconfiguring my apps. Thanks anyways

Motorola One Macro

Hello, i wanted to flash my phone(Motorola One Macro) to LineageOS 17.1, but it get error at flashing and now is phone permanently restarting.... i dont know how to flash new stock firmware, or any new android.
i know i can use adb, but it doesnt work or i do it bad. :angel:
pls help, thanks.
@drobec255
You by means of ADB always can re-flash phone's Stock ROM ( it's not necessary phone's boot-loader is unlocked )
Code:
adb devices
adb reboot recovery
[i][color=red]Note: In recovery menu presented select option Apply Update From ADB and confirm it, then proceed with[/color][/i]
adb sideload <PATH_TO_STOCK_ROM_IMAGE_FILE_ZIP>
adb reboot
jwoegerbauer said:
@drobec255
You by means of ADB always can re-flash phone's Stock ROM ( it's not necessary phone's boot-loader is unlocked )
Code:
adb devices
adb reboot recovery
[i][color=red]Note: In recovery menu presented select option Apply Update From ADB and confirm it, then proceed with[/color][/i]
adb sideload <PATH_TO_STOCK_ROM_IMAGE_FILE_ZIP>
adb reboot
Click to expand...
Click to collapse
ok, i flashed it to stock ROM, phone works.
I wanna flash it to LineageOS 17.1 but file is ".img.xz" ??? how to? bootloader is unlocked
@drobec255
1st of all things is you must have a TWRP matching your phone at your fingertips.
Next thing is that you must have a Lineage OS 17.1 version that's at 100% compatible with your phone - don't think this exists. BTW: Lineage OS always is offered as a signed ZIP-file.
If these requirements are met, then to replace phone's Android 9 by Lineage OS 17.1 you run this command sequence:
Code:
adb devices
[i][color=red]next 6 cmds backup /efs & /vendor partitions[/color][/i]
adb shell "cat /efs > /data/local/temp/efs_bkup"
adb pull /data/local/temp/efs_bkup %TEMP%\EFS_BKUP
adb shell "rm /data/local/temp/efs_bkup"
adb shell "cat /vendor > /data/local/temp/vendor_bkup"
adb pull /data/local/temp/vendor_bkup %TEMP%\VENDOR_BKUP
adb shell "rm /data/local/temp/vendor_bkup"
adb reboot bootloader
fastboot devices
fastboot erase system
fastboot erase cache
fastboot erase userdata
[i][color=red]temporarily boot into TWRP[/color][/i]
fastboot boot <PATH_TO_TWRP_IMG>
[i][color=red]In TWRP's menu select option Apply update from ADB and confirm[/color][/i]
adb sideload <PATH_TO_LINEAGE_OS_ZIP>
[i][color=red]next 2 cmds restore /efs & /vendor partitions[/color][/i]
adb push %TEMP%\EFS_BKUP /efs
adb push %TEMP%\VENDOR_BKUP /vendor
adb reboot
For anyone that this may still happen too....
Use RSA to put your phone back to it's stock rom. Even if it's bricked. it'll recovery it.
Rescue and Smart Assistant Tool - Motorola
<h6><span style="color:#FFFFFF"><strong>Our Rescue and Smart Assistant tool</strong><br />can help diagnose and resolve issues on your<br />Motorola phone or Lenovo phone/tablet.</span></h6>
www.motorola.com

Categories

Resources