[Q] In recovery mode build.prop sees values different than ROM Toolbox - Android Q&A, Help & Troubleshooting

I have a Lenovo S930 (this is not relevant IMHO) and every time I try to update its ROM with CWM I get an error message like "This package is for S930, this is a w8".
The message comes from the updater-script which for sanity checks that I am attempting the ROM installation on a device that can support it.
The device is rooted so I used ROM Toolbox's Build.prop Editor to check the value of ro.build.product and ro.product.device, and to my big surprise they are correctly set to S930.
I can even use the ROM Toolbox's Terminal Emulator, go to /system and grep for "w8" in all the files, but it's not contained anywhere.
The typical trick I've used so far has been to modify updater-script to look for w8 instead, with this hack all the ROMs I've tried until now were working perfectly fine.
Now my question is: were the hell is CWM recovery taking the value "w8" for ro.product.device from, if I can't find it anywhere when the system is running? And most importantly, is there a way to change it once and for all?

Related

[Q] Attempting to root Android 4.3 with ro.secure=0 in /default.prop, no go, help?

This used to work under Android 4.0, 4.1, 4.2.... but I can't get it to work under the new 4.3.
I have had a Google Nexus 10 tablet for months, worked great. I installed the new Android 4.3 mantaray-jwr66v image onto it, worked great. I then tried to root it by unpacking the boot.img file, making changes to the default.prop file, and flashing this boot_new.img file to the device. My default.prop file now looks like:
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb
ro.adb.secure=0
I have tried various different combinations of the above (e.g. just changing the ro.secure line), but nothing I try gives me the # prompt like I used to get under 4.2. I just get "[email protected]:/ $". At the shell prompt, when I try "cat /default.prop" I get the lines shown above (which confirms the boot_new.img file is formatted correctly).
I am perplexed. Does anyone know why this is the case? Did something change?
Note that I am aware there are other rooting methods available, and I am sure many of you will suggest I try one of those routes. Thank you in advance, but I would prefer to use this method... my rooting is part of a bigger deployment picture, and the existing system is written to root and unroot with changed boot.img files.
So my question in a nutshell: has anything changed in the (standard?) procedure for rooting a tablet with ro.secure=0 with Android 4.3?
If you have used this method successfully, I would appreciate hearing about that as well, as it would indicate my process is faulty somehow.
This is my first post to XDA, I did read the rules, and I hope I included enough info.
Thanks a lot!
...Bruce
LeftTwin said:
This used to work under Android 4.0, 4.1, 4.2.... but I can't get it to work under the new 4.3.
I have had a Google Nexus 10 tablet for months, worked great. I installed the new Android 4.3 mantaray-jwr66v image onto it, worked great. I then tried to root it by unpacking the boot.img file, making changes to the default.prop file, and flashing this boot_new.img file to the device. My default.prop file now looks like:
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb
ro.adb.secure=0
I have tried various different combinations of the above (e.g. just changing the ro.secure line), but nothing I try gives me the # prompt like I used to get under 4.2. I just get "[email protected]:/ $". At the shell prompt, when I try "cat /default.prop" I get the lines shown above (which confirms the boot_new.img file is formatted correctly).
I am perplexed. Does anyone know why this is the case? Did something change?
Note that I am aware there are other rooting methods available, and I am sure many of you will suggest I try one of those routes. Thank you in advance, but I would prefer to use this method... my rooting is part of a bigger deployment picture, and the existing system is written to root and unroot with changed boot.img files.
So my question in a nutshell: has anything changed in the (standard?) procedure for rooting a tablet with ro.secure=0 with Android 4.3?
If you have used this method successfully, I would appreciate hearing about that as well, as it would indicate my process is faulty somehow.
This is my first post to XDA, I did read the rules, and I hope I included enough info.
Thanks a lot!
...Bruce
Click to expand...
Click to collapse
You are not alone in this. I encountered the same problem recently and was also confused. I decided to contact the kernel dev Imoseyon to see if he knew what was up. When I first told him I had the problem he originally suspected it was related to SELinux, but upon actual review of the decompiled 4.3 boot.img he found the culprit.
The restriction is apparently due to the new adbd binary [located in the sbin directory]. If you swap that adbd binary out for the 4.2.* version, and make the same changes you made above [in the OP] to the default.prop, then walla! You will have a successfully modified boot.img that allows running privileged commands.
I kept finding this unanswered thread whenever I was Googling for clues, so it only seemed right to report back here now that I got figured out.
Cheers.
{{ WugFresh }}
WugFresh said:
You are not alone in this. I encountered the same problem recently and was also confused. I decided to contact the kernel dev Imoseyon to see if he knew what was up. When I first told him I had the problem he originally suspected it was related to SELinux, but upon actual review of the decompiled 4.3 boot.img he found the culprit.
The restriction is apparently due to the new adbd binary [located in the sbin directory]. If you swap that adbd binary out for the 4.2.* version, and make the same changes you made above [in the OP] to the default.prop, then walla! You will have a successfully modified boot.img that allows running privileged commands.
I kept finding this unanswered thread whenever I was Googling for clues, so it only seemed right to report back here now that I got figured out.
Cheers.
{{ WugFresh }}
Click to expand...
Click to collapse
I replaced the sbin/adbd with 4.2.2's, and modified the default.prop, but why i still can't run privileged commands?
How can i disable adb ?
Hi,
i have a baseline android kitkat and i want to disable root acces to adb .
Can you help me please
labiba

difficulty pulling build.prop using twrp - trying to get miracast to work.

Hi there, i've been trying to make some changes to my build.prop (mainly enable miracast...can't believe they would disable it!) and i've had a rather challenging time.
I am now stuck on how to pull the actual build.prop...when i enter the command i get a long list of ADB definitions but no file - at least not that i could find. I tried a few times, including directing the file to be saved on an empty drive in case i could not see it.
I have unlocked my boatloader and installed TWRP. Mounted the system then gone back and entered the commands in ADB....and i don't seem to be having any success. Any help would be appreciated.
thanks
m
Why not just edit it within the built in editors in most file explorers? I use Solid Explorer and it allows me to edit at will within the app itself, no pushing or pulling. Of course I back up my current one before doing anything to it
Tower1972 said:
Why not just edit it within the built in editors in most file explorers? I use Solid Explorer and it allows me to edit at will within the app itself, no pushing or pulling. Of course I back up my current one before doing anything to it
Click to expand...
Click to collapse
i'm not rooted...and i've read that you don't get OTA updates...and it's happened to me more than once that i have an issue with the phone, and i can't get service because it's rooted...
and i guess i thought it was too much trouble to get rooted, make the changes, and then unroot...but i could be wrong at this point?!
You won't get OTA with twrp either. You need stock recovery.
so i bit the bullet and rooted my phone...i was able to get the build.prop editor to work (at first i did not have busybox which it seems helps apps to realize you have root). So now when i go to unable Casting, i can turn it on from the top right of the cast screen, and my tv appears. I can select it and it starts to sync up...then the mircosoft display adapter shows that it's also trying to sync...and then it times out it seems. I've checked it with my tablet and my wife's phone...both work.
any suggestions?
I understand Miracast no longer works in Nougat. I'm still on MM with my 6P and it works, but if you're on 7, you may have lost that feature.
What about WUGS toolkit? Do you need to re rooted for that...ifnot thats what I always use to edit the prop. So much easier as it has most edits you'll make and you just choose.
you never needed to root i edit build.prop like this all the time
1. boot to twrp recovery
2. go to mounts and select system
3. adb pull /system/build.prop
4. make edits
5. adb push build.prop /system/
idk if your edit will work but thats how to do it without root and for some of the other things said in this topic you can ota in twrp but it will fail if modify anything like you just did

How to fix the phone that can't login coz its system attributes has been changed?

Hi Everyone,
I have a phone, the Huawei Ascend P7 -L10.
Some weeks earlier I tried to install Spotify in my phone, but I didn't manage to install it. After several attempts I end up crocking my phone.
It happened when I found some app that had apparent solution to solve Spotify installation problem. I don't remember the name of the app. Anyway, I found it effective so I tried to follow the instructions given. I made it, then the changes were effective. What the app does is to change the phone model and respective carrier.
All the dilemmas started when I decided to restart the phone.
Here goes what I've done so far after the incident.
1. I tried by myself to restore/upgrade the system. I've experience doing this.
2. I took the phone to the 1st Repair Agency - they did not fix it
3. I took to the 2nd Repair Agency - the same thing, they fail to fix it
Note: When you try to restore the phone it gives the following information “update failed!"
and when you normally try to switch the phone on it stop on black screen and nothing else, I've also tried wipe cache, wipe data everything but nothing. Please help!!
Sounds like it might have modified your build.prop (general explanation of build.prop is here: http://forum.xda-developers.com/android/general/explanation-build-prop-values-t3069341). Basically this file found in /system dictates a lot of settings and modes for the phone to do and be in. If you are rooted, then you can view the build.prop with a build.prop editor, text editor, or root enabled file manager. If you aren't rooted, then you will have to see if there is a way to install TWRP recovery or you might be able to use adb if you can still get into your phone's settings. With adb, you should be able to pull the file to your PC then edit it back to the correct info. You might need to see if you can download a rom that will have this info or get someone in the forum for your phone to post it so you can verify that everything is the way it should be. Once that is done then updates should work again. Reason being is that most updates reference the build.prop to make sure it is installing to the correct device to avoid major issues.
es0tericcha0s said:
Sounds like it might have modified your build.prop (general explanation of build.prop is here: http://forum.xda-developers.com/android/general/explanation-build-prop-values-t3069341). Basically this file found in /system dictates a lot of settings and modes for the phone to do and be in. If you are rooted, then you can view the build.prop with a build.prop editor, text editor, or root enabled file manager. If you aren't rooted, then you will have to see if there is a way to install TWRP recovery or you might be able to use adb if you can still get into your phone's settings. With adb, you should be able to pull the file to your PC then edit it back to the correct info. You might need to see if you can download a rom that will have this info or get someone in the forum for your phone to post it so you can verify that everything is the way it should be. Once that is done then updates should work again. Reason being is that most updates reference the build.prop to make sure it is installing to the correct device to avoid major issues.
Click to expand...
Click to collapse
Thanks for your replay. My device is rooted one, but the problem is, I can't login not even connect it via cable (using e.g. HiSuite). So, how can I pick up the file from phone?

Direct TV Error 40 Root Check bypass on Amlogic s905x (TX5Pro, Marshmallow)

I downloaded the DirecTV Now app on New Year's Eve hoping for $35/cable. Instead, I was greeted with the same Error 40 that everyone with a rooted device got. It took me a couple of days of researching and playing and reflashing and..., but I've finally figured out the simple(r) method to bypass this stupid root check for DirectTV Now (AKA Error 40, QP1005)
This applies to the TX5Pro, but it should work on any s905x based AMLogic SoC running Marshmallow 6.0 (A95X, CQ9, TX5, TX3, X96, NEXBOX, +many more.) As I understand it, they all have similar Android builds using the p212 board and firmware. I also have a M8S s812 running Kit-Kat 4.4.2 that I'll work on breaking, next.
First things, first: If possible, find your firmware and do a clean flash. Not a requirement, but if you've been playing with this for a while and you've ended up here, you've probably mucked up your /system files in some way or another. I managed to screw up my su binary location a few times and couldn't get it back without a lot of work. Reflashing was a three-minute, headache-free task.
That said, you'll want to adb over tcp/ip as these devices don't like to play the USB cable game.
Code:
adb connect deviceipaddress:5555
Follow up with
Code:
adb shell
and
Code:
su
to get into a root shell (if you don't get one by default.) Mine came with SuperUser from ClockworkMod preinstalled as a system app. Mount your system folder
Code:
mount -o rw,remount,rw /system
and edit your build.prop file with Vim.
Code:
vi /system/build.prop
If Vim is new to you, search the interwebs for a Vim cheat sheet.
Here's the trick with this... DirecTV Now's shared object file in lib/armeabi/libdrmagent_downloadable_jni.so looks for a few keywords within a few properties. Those properties are:
Code:
ro.build.product
ro.build.tags
ro.build.type
ro.build.display.id
...and the keywords are:
Code:
"release-keys, OnePlus2, OnePlus, Z26CL, STUDIO_C, user" are keywords that it favors, while "cm, cyanogen, cyanogenmod, debug, userdebug, A0001" are disqualifying keywords. Supposedly, "test-keys" is a bad word, too.
In my case, I needed to edit my build.prop to eliminate any sign of the bad words. Example:
Code:
ro.build.display.id=p212-userdebug 6.0.1 MHC19J 20160909 test-keys
to
ro.build.display.id=p212-user 6.0.1 MHC19J 20160909 release-keys
Run through the file and replace anything that says userdebug with user and test-keys with release-keys until you get to "#end build properties" Then save and reboot.
After reboot, install Hide My Root (I used the one from Amphoras) and hide the Su binary. This is where things might be getting tricky for some of you... on the TX5Pro, the SuperUser app is a system installed app, meaning it can't be uninstalled (it can, but it's not exactly a simple task for everyone) so you'll need to go into settings -> apps -> superuser and disable the app from there. Reboot again. Now, with the su binary hidden and the app's manifest not showing up in the system, the error 40 message should go away. This option will allow you to quickly restore su and SuperUser without needing a bunch of additional steps. You'll still need to set the device location service to "battery saving" (or use mock locations) but that's a simple task anyone can figure out.
The app is a choppy on high def feeds for some reason. I can't tell if this is processing/memory issue or a feed (wifi) issue. By default, the app doesn't work on ethernet, meaning you'll have to use wifi until you can fix that issue. But hey, one thing at a time, right? Anyway, I hope this helps anyone with this particular headache.
Thanks for pointing me in the right direction...
Got DirecTV NOW working on my nexus 6 running pure nexus ROM... I just did the edits with super su root and root explorer. Then disabled super su and rebooted.
Now to update the the build.prop files on the lineage os 13.0 nexus 10, and my wife's kltevzw (on ting gsm network) running lineage os 14.1
hi please help i flashed wrong twrp recovery i think now my amlogic smartbox failed to boot in recovery mode and the main problem is my smartbox Encryption Unsuccessful Factory reset, when i click factory reset nothing happend please guide how to solve this
Sent from my SM-N910G using Tapatalk
jameson.donaghy said:
I downloaded the DirecTV Now app on New Year's Eve hoping for $35/cable.
Click to expand...
Click to collapse
Any chance that you tried this out with Data Free TV/"Sponsored Data" with an AT&T wireless account? i.e. running the box through a Cellular Hotspot or tethered to your phone. I've been looking at if one could use one of therse Android TV Boxes to basically get Data Free TV.
my live tv app detect root try with magisk also but no success in my s905x help me guys
Sent from my SM-N910G using Tapatalk
is anyone help me out
Sent from my SM-N910G using Tapatalk
I edited my build.prop files to try and "hide" the root and I still get the error. I also tried root cloak with xposed and still nothing
Thanks so much
This really helped. I used Xposed module to hide those keywords. Worked a charm!

Gapps/TWRP/CWM on china tablet

Hello,
I recently got a hand on Yuntab K107, ARM MT8752, Android 5.12 Bootloader unlocked. Everything worked fine until factory reset, after that Google play store and other gapps stopped working (play store checking info, then goes black and freezes for a while).
Tablet is rooted from factory by kingroot, I tried finding TWRP/CWM for this tablet to reflash gapps but I failed. I also tried Magic TWRP installer and MTK droid tools. Magic TWRP installer acts like it's working but no results. MTK droid tools refuses to find my device even if i tried every driver possible and cleared wrong drivers with USBDeview.
I also tried flashing gapps manually thru root explorer by unpacking gapps files and matching system file structure also no luck.
Then I backed up the stock recovery and tried flashing few custom TWRP's that some post suggested may work (you guessed it - it didn't work) It just hangs on the first booting screen then it surrenders after a while and reboots back into android.
Do you know about any TWRP/CWM that might work on this tablet or any other way to repair gapps if recovery is not necessary?
Thanks
I also rooted it with kingroot but havnt any custom recovery but i doing some experiment. Let se what it will result
I should be able to compile TWRP for you
I have one of these K107 tablets but it is running Android 7 and so far I have been unable to root it. Because you guys have root you should be able to download adbd Insecure by chainfire and follow this guide to Fetch the boot.img file by Extracting the boot.img directly from the device:
you will first have to determine the (sadly device-specific) path to the storage device where boot.img's content can be retrieved. I know two methods for this:
ls /dev/block/platform/*/by-name/ (where * covers yet another device-specific folder name, chances are it is the only directory below platform/), the exact name to search is also platform dependent but makes usual sense (some examples: boot, LNX (acronym for "Linux")). The files in this directory are actually symbolic links and some people bother to manually go to the target, but I recommend sticking with the higher level name based path which, while longer, remains less error prone. So you will end-up with a path like /dev/block/platform/sdhci-tegra.3/by-name/LNX.
On some (older?) devices, the right device could be found by investigating the output of cat /proc/mtd. If you see the device mtd2 associated to the "boot" label, then you will use the path /dev/mtd2.
Now:
From the phone's developer menu:
Enable debugging on your phone,
Allow root access to ADB (this step applies to phones running CynogenMod, other devices may require some potentially more complex procedure),
Connect it to your computer (and from there to the VM guest if you are running Android tools from within a virtual machine).
If this is not already done, I recommend to manually start the ADB server on the computer's side, this will allow you to directly validate the RSA key on device's side without affecting the behavior of the following ADB commands:
adb start-server
Then switch ADB in root mode:
adb root
Finally, you should be able to directly extract the boot.img file from the device using such command (the source and destination path and names are given as examples, adapt them to your needs and preferences):
adb pull /dev/block/platform/sdhci-tegra.3/by-name/LNX ./boot.img
The command will copy the whole partition, both used and free space, so don't be surprised that the resulting boot.img file will be larger than the original boot.img file coming with the stock ROM .zip file, the content itself remains similar.
Once the transfer is finished, disconnect the phone and don't forget to disable both debugging and root access from the developer menu.
Then upload the boot.img and I will build TWRP and test it on my tablet for you

Categories

Resources