[Guide] What to do when android 10 GSI is missing "Use alternate way to detect headsets" setting under Phh Treble Settings? - Treble-Enabled Device Guides, News, & Discussion

1. Install an android 10 GSI where that setting is present, like Lineage OS
2. Find where the PhhTrebleApp is located by doing
Code:
adb shell pm path me.phh.treble.app
3. Extract it from your phone:
Code:
adb pull [path to apk] [path on your pc]
4. Install the GSI you want to use again
5. Install that apk in any other GSI that is missing that setting
Code:
adb install -r [path to apk]
or just flash the attached apk if you dont want to go through the struggle of losing your data changing roms

Related

[HOWTO] using dropbear sshd

This is going to be patently obvious to anybody familiar with Android, but I just started poking around and it wasn't clear to me how to do it. I figured I'd post it here if anybody else is in the same boat
1) Download CyanogenMod - build probably doesn't matter much, I used the I9000 ROM from this thread (n.b. - if you know of a trusted source to get current dropbear binaries, you don't need to download the huge CM zip, but I didn't see any floating around)
2) Extract the zip. You only need two files:
Code:
system/xbin/dropbear
and
Code:
system/xbin/dropbearkey
3) Navigate to the directory that contains those files using your favorite shell.
4) Push these to your device. This requires ADB (which is included in the Android SDK) in your path, it requires that your phone is rooted, and it requires that /system is mounted rw:
Code:
adb push dropbear /system/xbin/
adb push dropbearkey /system/xbin/
5) Run the following from 'adb shell' or a root terminal on your phone:
Code:
mkdir /data/dropbear; mkdir /data/dropbear/.ssh
(aside - why is there no -p option to my mkdir? weird)
6) From here, you can follow the instructions on the CM wiki and you're good to go!

[TIPS] Fastboot and adb on linux

I have a tip for everyone who use adb and fastboot in linux.
In most of the tutorials i see that you have go to exac folder to use them, but there is quite simple think you can do to use them from anywhere in your consol. All you have to do is
1. go in consol to the folder where you have adb and fastboot
2. then give command
Code:
sudo nautilus
or
Code:
su
nautilus
This should open a window with root permissions
3. in this windows you need to create shourtcats for adb and fastboot by right click mouse menu.
4. Next you need to cut shourtcats you created and place in folder /bin (you need to do this in the same window beacose you need to have root permissions to paste anything there.
5. And last think you need to do when you paste them it`s change there name`s for adb and fastboot.
Now you can use this commands without "./" and firstly you do not need to go to the folder where they realy are.
Now let say you have an system.img in /home/user/data you can now flash your phone in this way
Code:
su
cd /home/user/data
fastboot flash system system.img
or
Code:
su
fastboot flash system /home/user/data/system.img
su gives root permitions
Now i want to apologize for my english
If any one want to add this to his tutorial please give link for this thread or just write it`s made by me
abrams89 said:
I have a tip for everyone who use adb and fastboot in linux.
In most of the tutorials i see that you have go to exac folder to use them, but there is quite simple think you can do to use them from anywhere in your consol. All you have to do is
1. go in consol to the folder where you have adb and fastboot
2. then give command
Code:
sudo nautilus
or
Code:
su
nautilus
This should open a window with root permissions
3. in this windows you need to create shourtcats for adb and fastboot by right click mouse menu.
4. Next you need to cut shourtcats you created and place in folder /bin (you need to do this in the same window beacose you need to have root permissions to paste anything there.
5. And last think you need to do when you paste them it`s change there name`s for adb and fastboot.
Now you can use this commands without "./" and firstly you do not need to go to the folder where they realy are.
Now let say you have an system.img in /home/user/data you can now flash your phone in this way
Code:
su
cd /home/user/data
fastboot flash system system.img
or
Code:
su
fastboot flash system /home/user/data/system.img
su gives root permitions
Now i want to apologize for my english
If any one want to add this to his tutorial please give link for this thread or just write it`s made by me
Click to expand...
Click to collapse
Sometimes SU alone wont switch to the root user in some distributions (eg. Ubuntu Variants) If you want to switch to root, type sudo su or type "sudo <name of program>" and it will run that program as root.
Jack

Fixing script for boot looping on OOS 3 [Linux][OS X?]

Basically, this is a copy-paste thread from this thread.
THIS GUIDE IS FOR LINUX (AND OS X ?) ONLY! Windows version here
Download file here: https://mega.nz/#!wooAGJYA!Hr7VUkPRt1Xx9QxaRSIX-r7u9R8OtBhcpb8W5FdwHS8
Open a terminal (Ctrl + Alt + T) and go to your "~/Downloads" directory (or basically where you download your files):
Code:
cd ~/Downloads
Now, unzip the archive you just download:
Code:
unzip FixOOS3-TWRP.zip
You should now have a folder called "FixOOS3-TWRP". Go into this folder with "cd" command :
Code:
cd FixOOS3-TWRP.zip
Get sudo access (script won't run if not in root):
Code:
sudo -s
and then:
Code:
./fixoos.sh
.
The script will flash all necessary files to your device, and after 3 seconds. it will automatically reboot onto new TWRP.
From this TWRP you'll be able to flash newest CM 13 ROMs and OOS 3.x.x.
If there is no ROMs present on your phone, you can still push it with (be sure to stay in the current directory to use "./adb") :
Code:
./adb push <name_of_the_ROM>.zip /location/on/the/device/
of you can sideload it:
Code:
./adb sideload <name_of_the_ROM>.zip
(Be sure to be in "sideload mode" in TWRP).
For more pictures, check out original thread by @djsubterrain : fastboot outputs are pretty much the same, beside the fact that you are on Windows and Linux.

ROM for Moto x style Brasil edition dual sim

i am having Moto X style Brazil edition dual sim Retla 6.0
i have tried many Nougat​ Roms Like AICP ., RR , but none of them detected my Sim Card
plz any one help me and tell me about which Rom i Could flash on This varient
i Shall be very thankful .
I have the same problem @malkuu, have you fixed your phone?
richardtrle said:
I have the same problem @malkuu, have you fixed your phone?
Click to expand...
Click to collapse
Yes i have fixed that
richardtrle said:
I have the same problem @malkuu, have you fixed your phone?
Click to expand...
Click to collapse
Follow this
NOTE: This assumes that you have already setup ADB and Fastboot on your PC.
1- Boot your Android device into TWRP recovery.
2- Select Mount » and then select System from the list of partitions to mount the system partition and then go back.
3- Connect your device to the PC with an authentic USB cable.
4- Open a command window on the PC and issue the following command to pull build.prop file from the device:
adb pull /system/build.prop
The above command will download the build.prop file to your PC in the same directory where your command prompt is running from.
+ Tip: Make a copy of the build.prop file before you edit it so that you’ve a backup of the original file.
5. Open the build.prop file on your PC using the Notepad++ program.
6. Edit the build.prop file and add following lines to the Radio Section (or anywhere for that matter) and save it on the PC after making the changes.
This is the MAIN STEP TO FIXED FOR GET DUAL SIM
ro.fsg-id=emea_dsds
persist.radio.multisim.config=dsds
ro.telephony.ril.config=simactivation
7. Once you’ve saved the edits to the build.prop file, push it back to the device using the following command:
adb push build.prop /system/
8. Now set the correct permissions for the build.prop file with following commands (issue them one-by-one):
adb shell
cd system
chmod 644 build.prop
9. Once you’ve set the correct permission for build.prop file, reboot your device to system from TWRP’s Reboot » System option.
That’s it.
malkuu said:
Follow this
NOTE: This assumes that you have already setup ADB and Fastboot on your PC.
1- Boot your Android device into TWRP recovery.
2- Select Mount » and then select System from the list of partitions to mount the system partition and then go back.
3- Connect your device to the PC with an authentic USB cable.
4- Open a command window on the PC and issue the following command to pull build.prop file from the device:
adb pull /system/build.prop
The above command will download the build.prop file to your PC in the same directory where your command prompt is running from.
+ Tip: Make a copy of the build.prop file before you edit it so that you’ve a backup of the original file.
5. Open the build.prop file on your PC using the Notepad++ program.
6. Edit the build.prop file and add following lines to the Radio Section (or anywhere for that matter) and save it on the PC after making the changes.
This is the MAIN STEP TO FIXED FOR GET DUAL SIM
ro.fsg-id=emea_dsds
persist.radio.multisim.config=dsds
ro.telephony.ril.config=simactivation
7. Once you’ve saved the edits to the build.prop file, push it back to the device using the following command:
adb push build.prop /system/
8. Now set the correct permissions for the build.prop file with following commands (issue them one-by-one):
adb shell
cd system
chmod 644 build.prop
9. Once you’ve set the correct permission for build.prop file, reboot your device to system from TWRP’s Reboot » System option.
That’s it.
Click to expand...
Click to collapse
i did that but it didn't work for me
custom roms like AICP and lineage can't rocognize my simcards
what should i do then?
ehsan_991 said:
i did that but it didn't work for me
custom roms like AICP and lineage can't rocognize my simcards
what should i do then?
Click to expand...
Click to collapse
bro i am also using AICP rom u must edit build.prop correctly like when u add lines under radio section dont forget to add a blank space between radio section and the next section

[Guide]Temporary root(Dirty COW) Marshmallow , Honor 5x

This is a guide on how to obtain temporary root on marshmallow stock ROM for the Honor5x. Works on KIW-L24 and should work fine for other models.
1. Install Android Studio.
2. Install NDK within android studio.
3. If you run
Code:
ndk-build
and it says command not found, you'll need to add the ndk-build path to your environmental variable. After you install NDK, 'ndk-build' file will exist on your computer. In Linux, the path location is ~/Android/Sdk/ndk/22.1.7171670/build/ndk-build
Ex.
Code:
export PATH=$PATH:/home/user123/Android/Sdk/ndk/22.1.7171670/build/
4. Download Dirty COW exploit and extract zip to a folder: https://github.com/timwr/CVE-2016-5195
5. Open terminal and navigate to 'CVE-2016-5195' directory.
6. Plug your phone in and make sure you can 'adb devices'.
7.
Code:
make root && adb shell;
8.a If you get error 'CANNOT LINK EXECUTABLE cannot locate symbol'. Then go to ~/Android/Sdk/ndk/22.1.7171670/build/gmsl and modify line 512 of '__gmsl' to say:
Code:
int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))
More Info See: https://stackoverflow.com/questions/17131691/non-numeric-second-argument-to-wordlist
8.b.
Code:
make root && adb shell;
9. If everything goes right, you should be inside the shell of the phone and you should see '#' instead of '$', which indicates root.
The command that gets executed that puts you in temporary root is
Code:
adb shell /system/bin/run-as
Now what I don't know is how to obtain permanent root from here. Most people are going to say 'unlock your bootloader and flash a different ROM'. While I agree, this is the ideal solution. But if you can't unlock bootloader then the next best thing is permanent root on your current build.
I got # after step 9. But how that is temporary root? Root checker app doesn't recognize as rooted device.

Categories

Resources