[Q] 4.3 update (touchwiz) - no codes work anymore - how do I QPST now? - Verizon Samsung Galaxy S III

original firmware had a number of hidden codes that you put into dialer and it does stuff. None of them work anymore. Particularly the ones I care about are:
*#22745927 to enable hidden menu.
*#7284# to switch the UART and USB from PDA to MODEM (so that I could program PRL with QPST)
*#0*# hardware test
Are there alternatives?..

No.
Sent from my Last Ever Samsung Device.

0331 said:
No.
Sent from my Last Ever Samsung Device.
Click to expand...
Click to collapse
On the older firmwares there was an IOTHiddenMenu activity which you could invoke using
Code:
am start com.android.hiddenmenu/com.android.hiddenmenu.IOTHiddenMenu
command, but that doesn't work on 4.3
I know in AOSP there was a notion to turn into QPST mode by writing to kernel pseudo-files...
Engineers got to somehow be able to reprogram these phones, there's no way Samsung disabled this completely

I dug out some old scripts for AOSP, which seem to work. Device was accessible in QPST-programmable mode after them:
Code:
#/system/bin/sh
# sets DIAG mode
echo 0 > /sys/class/android_usb/android0/enable
echo 04E8 > /sys/class/android_usb/android0/idVendor
echo 6860 > /sys/class/android_usb/android0/idProduct
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo diag,acm,adb > /sys/class/android_usb/android0/functions
cat /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config
and to go back to MTP:
Code:
#/system/bin/sh
# sets default USB mode
echo 0 > /sys/class/android_usb/android0/enable
echo 04E8 > /sys/class/android_usb/android0/idVendor
echo 6860 > /sys/class/android_usb/android0/idProduct
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo mtp,acm,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
start adbd
setprop sys.usb.state sys.usb.config

Related

Imei 004999010640000

hi
i change my rom to new ics after that my imei change to 004999010640000 and cannt use rooming data . i backuped efs partition with EFS Pro 1.12.6 Release before change rom . now i restore it but do nothing . in site check a lot of software and tips to change my imei but noooothing.
imei changer
nv-date recovery
http://forum.xda-developers.com/showthread.php?t=1867442
.
.
.
USBUI code not work cant change usb to DM+MODEM+ADB and this script do nothing to change mode of usb :
echo 0 > /sys/class/android_usb/android0/enable 0
echo smd,bam > /sys/class/android_usb/android0/f_rmnet/transports
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo 1 > /sys/class/android_usb/android0/f_acm/instances
echo rmnet,acm,diag > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
what am i doing ?
Please Help Me

[Q] init.rc - disable usb connection

All,
I am attempting to block all forms of USB connection via a PC when the tab is plugged in (long reason why - but security requirement for my organisation).
So my first call was to look around the Kernel init.rc files to find out where the USB was activated, and it appears that init.rc calls init.espresso.usb.rc.
Commenting out the include file, building a new boot.img and flashing the device prevents USB access to the PC, but it also has the side effect of disabling the WiFi...
This is the content of the file ... so my question is - which bits of this are responsible for WiFi? I assume rndis - but i thought that was just tethering?
What should be being loaded to make WiFi work? Or are there any better ways of achieving my goals of blocking usb file acces, adb tethering etc...?
Code:
on init
write /sys/class/android_usb/android0/iSerial $ro.serialno
write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung
write /sys/class/android_usb/android0/f_rndis/vendorID 04e8
write /sys/class/android_usb/android0/f_rndis/wceis 1
on boot
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/iProduct $ro.product.model
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mtp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6863
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/bDeviceClass 224
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6864
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/bDeviceClass 224
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6865
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=ptp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6866
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis,dm
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
write /sys/class/android_usb/android0/idProduct 6862
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
Do not comment out the included file but change all "enable 1" to "enable 0".
ketut.kumajaya said:
Do not comment out the included file but change all "enable 1" to "enable 0".
Click to expand...
Click to collapse
Ok - so it turns out i was making a school boy error, the Version Magic on the Kernel wasn't matching the dhd.ko WiFi module. Looks like I didn't test that part before moving on!
Live and learn!
However - the method i was using i.e. Not calling init.<device>.usb.config.rc appears to work if anyone else needs to disable USB for security purposes.

[Completed] [Q] Turning cores on

i have turned my Core 1 and 3 off by this command adb root
adb stop mpdecision
adb shell
echo "0" > /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu2/online
echo "0" > /sys/devices/system/cpu/cpu3/online
i want to turn them back on
zeeshanhamza said:
i have turned my Core 1 and 3 off by this command adb root
adb stop mpdecision
adb shell
echo "0" > /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu2/online
echo "0" > /sys/devices/system/cpu/cpu3/online
i want to turn them back on
Click to expand...
Click to collapse
I only found this thread about it: [Q] Force enabled/disable CPU cores?.
So maybe starting mpdecision again may turn on the cores like before.
If you have further questions aout adb, please check:
1. Comprehensive Guide To ADB Commands.
2. [GUIDE] ADB Workshop and Guide for everyone.
Thread closed and thank you !

Ideal Init for AOSP-based ROMs

I wrote this program because Android's init process on Qualcomm phones is absolutely terrible. It's full of things like the following hidden code segment:
Code:
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/f9967000.i2c/i2c-0/0-0072/enable_irq ]; then
echo 1 > /sys/devices/f9967000.i2c/i2c-0/0-0072/enable_irq
else
echo "doesn't find slimport enable_irq"
fi
case "$soc_id" in
"208" | "211" | "214" | "217" | "209" | "212" | "215" | "218" | "194" | "210" | "213" | "216")
for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
do
echo "cpubw_hwmon" > $devfreq_gov
done
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
#echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
#echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 20 > /sys/module/cpu_boost/parameters/boost_ms
#echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
#echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
#Set LGE Interactive-Grid parameters for G3 models
echo "20000 1100000:40000 1500000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1500000:90" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 960000 > /sys/module/cpu_boost/parameters/sync_threshold
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1 > /sys/devices/system/cpu/cpufreq/interactive/is_grid
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay
echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq
echo 7 > /sys/devices/system/cpu/cpufreq/interactive/middle_grid_step
echo 37 > /sys/devices/system/cpu/cpufreq/interactive/middle_grid_load
echo 14 > /sys/devices/system/cpu/cpufreq/interactive/high_grid_step
echo 46 > /sys/devices/system/cpu/cpufreq/interactive/high_grid_load
echo 1000 > /sys/class/devfreq/g3-display.0/polling_interval
setprop ro.qualcomm.perf.cores_online 2
;;
*)
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
# even if scaling_max_freq go down because of themal mitigation, input_boost frequency does not go down.
# echo 1190400 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
#Set LGE Ondemand-Grid parameters for msm8974aa
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_max_freq
echo 7 > /sys/devices/system/cpu/cpufreq/ondemand/middle_grid_step
echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/middle_grid_load
echo 14 > /sys/devices/system/cpu/cpufreq/ondemand/high_grid_step
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/high_grid_load
;;
esac
What is $soc_id equal to? Now we have to audit trail to see what and when $soc_id has been set to, which will open up another can of worms to see when it was initialized to, and what are the implications of having $soc_id set to a certain value, rather than another further down in the init process? Why can't we just extract all of the actual information to the boot process and leave the other junk (support for CPUs which are 5+ years old, unused features, etc) behind?
Enter Ideal Init. What Ideal Init is, consists of some changes to your device's stock kernel, and some changes to your device's stock ramdisk. Once you make the changes to the kernel and ramdisk, you create a boot.img with the new and updated kernel and ramdisk, and flash it to your device. The changes you just made to the kernel and ramdisk now allow the system calls made by your device's init.*.rc scripts and init shell scripts to be logged and dumped for later use.
From there you can dump your device's logs using the dmesg command, and run the ideal_init program on your computer to interpret these intercepted system calls and output a single valid init.<device>.rc. Then you can revert back to your original setup.
Basically, this program turns all of these init scripts and these init shell scripts and extracts only the information that was actually used in the boot process to create something like this
Check out the README for detailed instructions
https://github.com/JackpotClavin/Ideal-Init
Hope this helps the device bringup for future ROMs

Set MTP as default for USB on Android 7.1.2 / LineageOS 14.1 on SM-T280

Hey,
I'm running LineageOS 14.1 (Android 7.1.2) on an SM-T280. It's also rooted.
Whenever I reboot and connect USB, it only enables adb and charges. I want it to enable adb and mtp by default.
I know about the setting in the developer options, but this also is not persistent.
How do I enable MTP by default?
In Android's system file build.prop add MTP as default USB-mode
Code:
persist.sys.usb.config=mtp,adb
xXx yYy said:
In Android's system file build.prop add MTP as default USB-mode
Code:
persist.sys.usb.config=mtp,adb
Click to expand...
Click to collapse
Tried, does not work. When I reboot I get this:
Code:
gtexswifi:/ # cat /system/build.prop | grep usb
persist.sys.usb.config=mtp,adb
sys.usb.gser.count=8
sys.usb.config=mtp,adb
persist.sys.usb.config=mtp,adb
sys.usb.configfs=1
gtexswifi:/ # getprop | grep usb
[persist.sys.usb.config]: [adb]
[sys.usb.config]: [adb]
[sys.usb.configfs]: [0]
[sys.usb.ffs.ready]: [1]
[sys.usb.gser.count]: [8]
[sys.usb.state]: [adb]
gtexswifi:/ # ls /data/property/ | grep usb
persist.sys.usb.config
gtexswifi:/ # cat /data/property/persist.sys.usb.config
adb
Of course I also tried setprop persist.sys.usb.config "mtp,adb" which modifies /data/property/persist.sys.usb.config but this is reset on reboot.
I've found many websites that say it is simply not possible on Nougat :/
I also found https://forum.xda-developers.com/t/app-root-r-3-3-marshmallow-mtp-enabler.3263467/ but I don't want to install an app :/ I'm curious how it does it.
When I setprop sys.usb.config "mtp,adb" while the device is running, usb disconnects and reconnects, but there is still no MTP available.
Also tried
Bash:
echo 0 > /sys/class/android_usb/android0/enable
echo mtp,adb > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable
The device disconnects and reconnects from USB but only with adb enabled and
Code:
gtexswifi:/ # cat /sys/class/android_usb/android0/functions
ffs
afterwards
Source: https://books.google.de/books?id=0cuQAwAAQBAJ&pg=PA64&lpg=PA64&dq="android_usb/android0/enable"+mtp
Okay, I wen't through the effort to recompile the kernel and patch the init ramdisks /default.prop with
Code:
persist.sys.usb.config=adb,mtp
sys.usb.config=adb,mtp
Didn't help...
Any other ideas?

Categories

Resources