How To Guide BANKING APPS: How to modify build.Prop using recovery (and more...) - Motorola Moto G100 / Edge S

Ok, after some reading, testing and trying, my conclusion is that it is not possible to tweak a running system with not triggering SELinux.
Though, for letting banking apps work it is only needed to modify the build.prop in /system, which is in fact possible, even without TWRP.
So, this is what I am doing now:
Reboot into (LOS) recovery and then in the recovery menu:
Goto “Advanced”
Mount /system
Enable adb
From your pc with adb etc.. installed:
Code:
adb shell mount -o rw,remount /mnt/system
adb shell sed -i 's/ro.debuggable=1/ro.debuggable=0/g' /mnt/system/system/build.prop
adb shell sed -i 's/ro.build.type=userdebug/ro.build.type=user/g' /mnt/system/system/build.prop
adb reboot
That's it, banking apps working!

Okay, did some further research and in fact, found a solution for my "tweaking".
Though I have the feeling most people are not tweaking anymore, I hope it helps for the few people still interested! For me the result is a more lean system, working banking apps and HD calling (VoLTE), and it is just nice to do... ;-)
Scripts and approach can be found in the next posts.

After some boot issues I finally found out what was the issue of my problems with some tweaking around.
As we have a device with A/B, after flashing the update, the active partition is automatically switched after an update. This happens when flashing, so you have to reboot to recovery again directly after flashing the updated LOS and do the tweaking then to actually tweak the right partition...
A system update for me is now:
Code:
Reboot into recovery
CHECK WHICH IS THE ACTIVE PARTITION!!
Goto “Apply Update”
Goto “Apply from adb”
adb sideload <lineageos.zip>
Goto “Advanced”
Goto “Reboot to recovery”
CHECK WHICH IS THE ACTIVE PARTITION, SHOULD BE CHANGED!!
In recovery:
Goto “Advanced”
Goto “Mount /system”
Goto “Enable ADB”
Run tweak.bat
For the latest tweak script (a bat file) I am using now, see the next post.
Hope it helps for people with banking or VoLTE issues and the need to change some settings in build.prop or else... Use the information at your own risk

Latest tweaks.bat file (last changes 25/04/2023):
Code:
:: Moto G100 Tweak Script
:: Last modified 25-04-2023
:: Moto-J
:: ------------------------------------------------------------
:: Changelog:
::
:: 22-04-23 Added:
:: adb shell rm -rf /mnt/product/app/ApertureLensLauncher
:: adb shell rm -rf /mnt/system_ext/app/MotoActions
:: adb shell rm -rf /mnt/system_ext/app/WAPPushManager
:: adb shell rm -rf /mnt/system_ext/priv-app/LineageSetupWizard
:: ------------------------------------------------------------
@echo off
Setlocal EnableDelayedExpansion
color 0A
cls
echo MOTO G100 TWEAK SCRIPT
echo.
echo IMPORTANT:
echo - First boot into recovery
echo - Goto advanced and mount /system
echo - Goto advanced and enable adb
echo.
pause
echo.
echo ------------------------------------
echo Connecting device...................
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
adb devices
:: ------------------------------------------------------------
echo ------------------------------------
echo Mounting system partitions..........
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
:: /dev/block/dm-6 = /product
:: /dev/block/dm-7 = /system
:: /dev/block/dm-8 = /system_ext
:: /dev/block/dm-9 = /vendor
adb shell mkdir /mnt/product > nul 2>&1
adb shell mkdir /mnt/system > nul 2>&1
adb shell mkdir /mnt/system_ext > nul 2>&1
adb shell mkdir /mnt/vendor > nul 2>&1
adb shell mount -o rw,remount /mnt/system
adb shell mount /dev/block/dm-6 /mnt/product
adb shell mount /dev/block/dm-7 /mnt/system > nul 2>&1
adb shell mount /dev/block/dm-8 /mnt/system_ext
adb shell mount /dev/block/dm-9 /mnt/vendor
echo.
echo done
echo.
pause
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Removing some packages..............
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
:: /product/app
adb shell rm -rf /mnt/product/app/Aperture
adb shell rm -rf /mnt/product/app/ApertureLensLauncher
adb shell rm -rf /mnt/product/app/Backgrounds
adb shell rm -rf /mnt/product/app/Gallery2
adb shell rm -rf /mnt/product/app/Jelly
adb shell rm -rf /mnt/product/app/PhotoTable
adb shell rm -rf /mnt/product/app/PowerOffAlarm
:: /product/priv-app
adb shell rm -rf /mnt/product/priv-app/Eleven
adb shell rm -rf /mnt/product/priv-app/OneTimeInitializer
:: /system/app
adb shell rm -rf /mnt/system/system/app/BasicDreams
adb shell rm -rf /mnt/system/system/app/BluetoothMidiService
adb shell rm -rf /mnt/system/system/app/BookmarkProvider
adb shell rm -rf /mnt/system/system/app/CaptivePortalLogin
adb shell rm -rf /mnt/system/system/app/CarrierDefaultApp
adb shell rm -rf /mnt/system/system/app/CompanionDeviceManager
adb shell rm -rf /mnt/system/system/app/EasterEgg
adb shell rm -rf /mnt/system/system/app/HTMLViewer
adb shell rm -rf /mnt/system/system/app/PrintRecommendationService
adb shell rm -rf /mnt/system/system/app/SimAppDialog
adb shell rm -rf /mnt/system/system/app/Stk
adb shell rm -rf /mnt/system/system/app/WallpaperBackup
:: /system/priv-app
adb shell rm -rf /mnt/system/system/priv-app/BackupRestoreConfirmation
adb shell rm -rf /mnt/system/system/priv-app/CallLogBackup
adb shell rm -rf /mnt/system/system/priv-app/InputDevices
adb shell rm -rf /mnt/system/system/priv-app/LiveWallpapersPicker
adb shell rm -rf /mnt/system/system/priv-app/ManagedProvisioning
adb shell rm -rf /mnt/system/system/priv-app/SharedStorageBackup
adb shell rm -rf /mnt/system/system/priv-app/StatementService
adb shell rm -rf /mnt/system/system/priv-app/Tag
adb shell rm -rf /mnt/system/system/priv-app/VpnDialogs
:: /system_ext/app
adb shell rm -rf /mnt/system_ext/app/datastatusnotification
adb shell rm -rf /mnt/system_ext/app/IfaaService
adb shell rm -rf /mnt/system_ext/app/MotoActions
adb shell rm -rf /mnt/system_ext/app/SoterService
adb shell rm -rf /mnt/system_ext/app/WAPPushManager
:: /system_ext/priv-app
adb shell rm -rf /mnt/system_ext/priv-app/LineageSetupWizard
adb shell rm -rf /mnt/system_ext/priv-app/Seedvault
adb shell rm -rf /mnt/system_ext/priv-app/Updater
:: /vendor/app
adb shell rm -rf /mnt/vendor/app/TimeService
:: For debugging purposes:
adb shell ls /mnt/product/app > _packages-product-app.txt
adb shell ls /mnt/product/priv-app > _packages-product-priv-app.txt
adb shell ls /mnt/system/system/app > _packages-system-system-app.txt
adb shell ls /mnt/system/system/priv-app > _packages-system-system-priv-app.txt
adb shell ls /mnt/system_ext/app > _packages-system_ext-app.txt
adb shell ls /mnt/system_ext/priv-app > _packages-system_ext-priv-app.txt
adb shell ls /mnt/vendor/app > _packages-vendor-app.txt
echo.
echo done
echo.
pause
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Modifying /system/build.prop........
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
:: First remove the lines if available
adb shell sed -i '/^# Modified settings/d' /mnt/system/system/build.prop
adb shell sed -i '/^ro.debuggable/d' /mnt/system/system/build.prop
adb shell sed -i '/^ro.build.type/d' /mnt/system/system/build.prop
adb shell sed -i '/^fw.show_multiuserui/d' /mnt/system/system/build.prop
adb shell sed -i '/^fw.power_user_switcher/d' /mnt/system/system/build.prop
adb shell sed -i '/^fw.show_hidden_users/d' /mnt/system/system/build.prop
adb shell sed -i '/^ro.backup.disable/d' /mnt/system/system/build.prop
adb shell sed -i '/^ro.config.ksm.support/d' /mnt/system/system/build.prop
adb shell sed -i '/^persist.debug.wfd.enable/d' /mnt/system/system/build.prop
adb shell sed -i '/^persist.debug.wfd.appmonitoring/d' /mnt/system/system/build.prop
adb shell sed -i '/^debug.sf.enable_hwc_vds/d' /mnt/system/system/build.prop
adb shell sed -i '/^persist.adb.notify/d' /mnt/system/system/build.prop
adb shell sed -i '/^# end of file/d' /mnt/system/system/build.prop
:: And now add them at the end of the file
adb shell sed -i -e '$a# Modified settings' /mnt/system/system/build.prop
:: Let banking apps work
adb shell sed -i -e '$aro.debuggable=0' /mnt/system/system/build.prop
adb shell sed -i -e '$aro.build.type=user' /mnt/system/system/build.prop
:: Disable user switching
adb shell sed -i -e '$afw.show_multiuserui=0' /mnt/system/system/build.prop
adb shell sed -i -e '$afw.power_user_switcher=0' /mnt/system/system/build.prop
adb shell sed -i -e '$afw.show_hidden_users=0' /mnt/system/system/build.prop
:: Disable backup provider
adb shell sed -i -e '$aro.backup.disable=1' /mnt/system/system/build.prop
:: Disable Kernel Samepage Merging (KSM)
adb shell sed -i -e '$aro.config.ksm.support=false' /mnt/system/system/build.prop
:: Disable Mira Cast (Wifi Direct) eating your battery
adb shell sed -i -e '$apersist.debug.wfd.enable=0' /mnt/system/system/build.prop
adb shell sed -i -e '$apersist.debug.wfd.appmonitoring=0' /mnt/system/system/build.prop
adb shell sed -i -e '$adebug.sf.enable_hwc_vds=0' /mnt/system/system/build.prop
:: Disable notification while adb is active
adb shell sed -i -e '$apersist.adb.notify=0' /mnt/system/system/build.prop
adb shell sed -i -e '$a# end of file' /mnt/system/system/build.prop
:: For debugging purposes:
adb pull /mnt/system/system/build.prop
del /F _build.system.prop > nul 2>&1
ren build.prop _build.system.prop
echo.
echo done
echo.
pause
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Modifying /vendor/build.prop........
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
:: First remove the lines if available
adb shell sed -i '/^# Modified settings/d' /mnt/vendor/build.prop
:: Firmware date
adb shell sed -i '/^ro.vendor.build.security_patch/d' /mnt/vendor/build.prop
:: Display
adb shell sed -i '/^debug.hwui.disable_vsync/d' /mnt/vendor/build.prop
adb shell sed -i '/^debug.hwui.render_dirty_regions/d' /mnt/vendor/build.prop
adb shell sed -i '/^persist.sys.use_dithering/d' /mnt/vendor/build.prop
adb shell sed -i '/^ro.sf.lcd_density/d' /mnt/vendor/build.prop
:: VoLTE (only what is missing)
adb shell sed -i '/^persist.dbg.ims_volte_enable/d' /mnt/vendor/build.prop
adb shell sed -i '/^persist.dbg.volte_avail_ovr/d' /mnt/vendor/build.prop
adb shell sed -i '/^persist.dbg.vt_avail_ovr/d' /mnt/vendor/build.prop
adb shell sed -i '/^persist.dbg.wfc_avail_ovr/d' /mnt/vendor/build.prop
adb shell sed -i '/^persist.vendor.radio.calls.on.ims/d' /mnt/vendor/build.prop
adb shell sed -i '/^persist.vendor.data.iwlan.enable/d' /mnt/vendor/build.prop
adb shell sed -i '/^# end of file/d' /mnt/vendor/build.prop
:: And now add them at the end of the file
adb shell sed -i -e '$a# Modified settings' /mnt/vendor/build.prop
:: Firmware date
set CUR_YYYY=%date:~9,4%
set CUR_MM=%date:~6,2%
set CUR_DD=%date:~3,2%
set SUBDATE=%CUR_YYYY%-%CUR_MM%-%CUR_DD%
adb shell sed -i -e '$aro.vendor.build.security_patch=%SUBDATE%' /mnt/vendor/build.prop
:: Display
adb shell sed -i -e '$adebug.hwui.disable_vsync=true' /mnt/vendor/build.prop
adb shell sed -i -e '$adebug.hwui.render_dirty_regions=false' /mnt/vendor/build.prop
adb shell sed -i -e '$apersist.sys.use_dithering=0' /mnt/vendor/build.prop
adb shell sed -i -e '$aro.sf.lcd_density=460' /mnt/vendor/build.prop
:: VoLTE (only what is missing)
adb shell sed -i -e '$apersist.dbg.ims_volte_enable=1' /mnt/vendor/build.prop
adb shell sed -i -e '$apersist.dbg.volte_avail_ovr=1' /mnt/vendor/build.prop
adb shell sed -i -e '$apersist.dbg.vt_avail_ovr=1' /mnt/vendor/build.prop
adb shell sed -i -e '$apersist.dbg.wfc_avail_ovr=1' /mnt/vendor/build.prop
adb shell sed -i -e '$apersist.vendor.radio.calls.on.ims=1' /mnt/vendor/build.prop
adb shell sed -i -e '$a# end of file' /mnt/vendor/build.prop
:: FOR VOLTE CHECK, DIAL *#*#4636#*#*, PHONE INFORMATION - 3DOTS MENU - IMS SERVICE STATUS
::
:: Complete VoLTE settings:
::
:: # Debug Options
:: persist.dbg.ims_volte_enable=1
:: persist.dbg.volte_avail_ovr=1
:: persist.dbg.vt_avail_ovr=1
:: persist.dbg.wfc_avail_ovr=1
::
:: # Data Options
:: # Commented this line out as it was reported to break WiFi calling on some carriers.
:: # persist.data.iwlan.enable=true
::
:: # Radio Options
:: persist.radio.rat_on=combine (OR persist.vendor.radio.rat_on=combine)
:: persist.radio.data_ltd_sys_ind=1 (OR persist.vendor.radio.data_ltd_sys_ind=1)
:: persist.radio.data_con_rprt=1 (OR persist.vendor.radio.data_con_rprt=1)
:: persist.radio.calls.on.ims=1 (OR persist.vendor.radio.calls.on.ims=1)
:: For debugging purposes:
adb pull /mnt/vendor/build.prop
del /F _build.vendor.prop > nul 2>&1
ren build.prop _build.vendor.prop
echo.
echo done
echo.
pause
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Proper unmount partitions...........
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
adb shell umount /mnt/product
adb shell umount /mnt/system
adb shell umount /mnt/system_ext
adb shell umount /mnt/vendor
echo.
echo done
echo.
pause
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Rebooting phone...
echo ------------------------------------
echo.
pause
adb reboot

For who wants to use some additional adb tweaks; it is possible to do this by enabling adb in your developer settings.
Here is the bat-file I am using (last changes 17/04/2023):
Code:
:: Moto G100 Tweak Script
:: Last modified 17-04-2023
:: Moto-J
:: ------------------------------------------------------------
@echo off
Setlocal EnableDelayedExpansion
color 0A
cls
echo MOTO G100 ADB TWEAK SCRIPT
echo.
echo IMPORTANT:
echo - Enable ADB in developer settings
echo - Connect phone and accept adb connection
echo.
pause
echo.
echo ------------------------------------
echo Connecting device...................
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
adb devices
:: ------------------------------------------------------------
echo ------------------------------------
echo Running tweaks......................
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
echo Enable privacy logging 7-day dashboard...
:: Enable privacy logging 7-day dashboard
adb shell device_config put privacy privacy_dashboard_7_day_toggle true
pause
echo Enable new combined safety center........
:: Enable new combined safety center
adb shell device_config put privacy safety_center_is_enabled true
pause
echo Enable DNS-over-HTTP3 support............
:: Enable DNS-over-HTTP3 support
adb shell device_config put netd_native doh 1
pause
echo Enable cached apps freezer...............
:: Enable cached apps freezer
adb shell device_config put activity_manager_native_boot use_freezer true
pause
echo Defer boot completed broadcasts..........
:: Defer boot completed broadcasts for background restricted apps
adb shell device_config put activity_manager defer_boot_completed_broadcast 2
pause
echo Enable separate notification slider......
adb shell device_config put systemui volume_separate_notification true
pause
echo.
echo Done!
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Now reboot and disable adb again....
echo ------------------------------------
echo.
pause
adb reboot
You can enable adb and adb-root, run the script, reboot and afterwards disable adb again.
The settings will stay even after updating, so only running the script once is enough.

Also with a custom rom you want to update your firmware so now and then.
Luckily we can find the firmware for our phone here:
lolinet mirrors - firmware, software, iso etc.
lolinet mirrors - powered by h5ai
mirrors.lolinet.com
And here is the bat-file I am using with phone connected to PC in bootloader (last changes 15/04/2023):
Code:
:: Moto G100 Firmware Update Script
:: Last modified 15-04-2023
:: Moto-J
:: ------------------------------------------------------------
@echo off
Setlocal EnableDelayedExpansion
color 0A
cls
echo MOTO G100 FIRMWARE UPDATE SCRIPT
echo.
echo IMPORTANT:
echo - Connect phone to USB of PC
echo - Boot into bootloader
echo - Execute this BAT-file in directory with fastboot and latest firmware
echo.
pause
echo.
echo ------------------------------------
echo Connecting device...................
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
fastboot devices
:: ------------------------------------------------------------
echo ------------------------------------
echo Updating firmware files.............
echo ------------------------------------
echo.
echo Terminal output will be displayed here:
fastboot flash modem_a NON-HLOS.bin
fastboot flash modem_b NON-HLOS.bin
fastboot erase mdmddr
fastboot flash fsg_a fsg.mbn
fastboot flash fsg_b fsg.mbn
fastboot erase mdm1m9kefs1
fastboot erase mdm1m9kefs2
fastboot flash bluetooth_a BTFM.bin
fastboot flash bluetooth_b BTFM.bin
fastboot flash dsp_a dspso.bin
fastboot flash dsp_b dspso.bin
fastboot flash logo_a logo.bin
fastboot flash logo_b logo.bin
fastboot erase carrier
fastboot erase ddr
echo.
echo done
echo.
pause
echo.
:: ------------------------------------------------------------
echo ------------------------------------
echo Rebooting phone...
echo ------------------------------------
echo.
pause
fastboot reboot
I am only flashing the neccessary stuff as radio and bluetooth and only that is erased what is needed for the update. No data is lost after update, no other tweaking needed.
On first reboot switch off your WiFi and wait a few seconds; carrier info will be updated from your provider and everything is working again. After that you can switch on your WiFi again ;-)

Additional some things which could improve your battery life (and data usage), although this is already great because of the large battery of the Moto G100....
Restrict battery usage in background for apps which do not need it:
go to apps, show all apps, per app, go to battery usage and switch to restricted
For the apps with restricted battery usage, I also switch of background usage of mobile data and VPN.
go to apps, show all apps, per app, go to mobile data and wifi and switch off background usage and VPN
Switch off mobile data for all apps which do not need an internet connections
same approach, though switch off complete network access. You can do this for several apps which you are using without the need of an internet connection like most barcode and QR scanners, file browsers, card storage apps, galery's etc...
In network settings - SIM cards - preferred network types, only select the network types you really need and which are optimised for your usage.
for me this is NR/LTE/GSM/WCDMA as I switch off mobile data at night with profile settings and want to be available by phone (GSM/WCDMA), though for most people only NR/LTE will probably even fit when you are using the VoLTE changes from the first posts and VoLTE is working ;-)
Set peak frequency for screen refresh to 60 Herz, not 90 Herz. 90 Herz is more fluent when scrolling, though for normal reading, internet usage etc... I see no need for 90 Herz and it will save your battery
Set the time-out for your screen as short as possible. I am using 1 minute and it is okay for me.
Enable double click on status or lock screen to enable sleep and really use it.
Use dark theme and black background, although we do not have a led screen, it is still saving battery
Disable location and bluetooth when you are not using it, enable wifi (only) when available.
Disable tick to activate, screensaver and fingerprint sensor swipe
Don't use full brightness, though try to set it that low as possible
Don't charge your phone to 100% every time, though try to keep the battery level between 30-80%.
This is also why I have set battery saving planning to a percentage of 30%.
When you don't need your email updated real time, disable push and only use getting POP3 email for example every hour.
Although I am using a script to remove system apps after an update, you can also disable some system apps you not need. Either way; try to disable as much as possible which is not neccessary for a good working phone.
That's it for now. When I have some additional ideas I will let you know!

Outside of banking apps & enabling volte. What do your other removal of packages and tweaks do? Can you give a general breakdown?

Timmons said:
Outside of banking apps & enabling volte. What do your other removal of packages and tweaks do? Can you give a general breakdown?
Click to expand...
Click to collapse
Sorry but you really have to check yourself.
There are several websites where the apps of Android are explained
The same counts for the build.prop settings.
I think it would be good to check yourself so you know what you are doing.
And even better... may be you will find other tweaks you can share with us!

Moto-J said:
Sorry but you really have to check yourself.
There are several websites where the apps of Android are explained
The same counts for the build.prop settings.
I think it would be good to check yourself so you know what you are doing.
And even better... may be you will find other tweaks you can share with us!
Click to expand...
Click to collapse
Fair enough. You'd mentioned to chmod after updating. Do I have to do that if I just run your bat file to update it? Sorry for the rookie questions as I'm no expert at linux scripts.

Timmons said:
Fair enough. You'd mentioned to chmod after updating. Do I have to do that if I just run your bat file to update it? Sorry for the rookie questions as I'm no expert at linux scripts.
Click to expand...
Click to collapse
No, not neccessary when you are using the script and edit the file by using adb this way.
No rights are modified that way.

Moto-J said:
No, not neccessary when you are using the script and edit the file by using adb this way.
No rights are modified that way.
Click to expand...
Click to collapse
I've updated the script to only update the build file without removing anything but it's not working. getting this below for system & vendor
Modifying /system/build.prop........
------------------------------------
Terminal output will be displayed here:
sed: /mnt/system/system/build.prop: No such file or directory
------------------------------------
Modifying /vendor/build.prop........
------------------------------------
Terminal output will be displayed here:
sed: /mnt/vendor/build.prop: No such file or directory

Timmons said:
I've updated the script to only update the build file without removing anything but it's not working. getting this below for system & vendor
Modifying /system/build.prop........
------------------------------------
Terminal output will be displayed here:
sed: /mnt/system/system/build.prop: No such file or directory
------------------------------------
Modifying /vendor/build.prop........
------------------------------------
Terminal output will be displayed here:
sed: /mnt/vendor/build.prop: No such file or directory
Click to expand...
Click to collapse
Hi @Timmons;
Could it be that you removed the first part of the bat file where the drives are mounted?
Could you therefor share the complete bat file you are using now, so I can actually check what is or could be wrong?

Moto-J said:
Hi @Timmons;
Could it be that you removed the first part of the bat file where the drives are mounted?
Could you therefor share the complete bat file you are using now, so I can actually check what is or could be wrong?
Click to expand...
Click to collapse

And what happens when you copy the lines to the command line one by one instead of using the bat file?
Could you for example try the following lines to check:
Code:
adb devices
adb shell mkdir /mnt/vendor
adb shell mount /dev/block/dm-9 /mnt/vendor
adb shell ls /mnt/vendor
You should see a directory listing (ls) of /mnt/vendor or an error message somewhere

Moto-J said:
And what happens when you copy the lines to the command line one by one instead of using the bat file?
Could you for example try the following lines to check:
Code:
adb devices
adb shell mkdir /mnt/vendor
adb shell mount /dev/block/dm-9 /mnt/vendor
adb shell ls /mnt/vendor
You should see a directory listing (ls) of /mnt/vendor or an error message somewhere
Click to expand...
Click to collapse
C:\Users\Home\Downloads\Motorola>adb shell mkdir /mnt/vendor
mkdir: '/mnt/vendor': File exists
C:\Users\Home\Downloads\Motorola>adb shell ls /mnt/vendor
C:\Users\Home\Downloads\Motorola>adb shell mount /dev/block/dm-9 /mnt/vendor
mount: '/dev/block/dm-9'->'/mnt/vendor': No such file or directory
C:\Users\Home\Downloads\Motorola>adb devices
List of devices attached
ZY22CCJ22P recovery
C:\Users\Home\Downloads\Motorola>adb shell mount /dev/block/dm-9 /mnt/vendor
mount: '/dev/block/dm-9'->'/mnt/vendor': No such file or directory
Not having much luck entering them manually.

Timmons said:
C:\Users\Home\Downloads\Motorola>adb shell mkdir /mnt/vendor
mkdir: '/mnt/vendor': File exists
C:\Users\Home\Downloads\Motorola>adb shell ls /mnt/vendor
C:\Users\Home\Downloads\Motorola>adb shell mount /dev/block/dm-9 /mnt/vendor
mount: '/dev/block/dm-9'->'/mnt/vendor': No such file or directory
C:\Users\Home\Downloads\Motorola>adb devices
List of devices attached
ZY22CCJ22P recovery
C:\Users\Home\Downloads\Motorola>adb shell mount /dev/block/dm-9 /mnt/vendor
mount: '/dev/block/dm-9'->'/mnt/vendor': No such file or directory
Not having much luck entering them manually.
Click to expand...
Click to collapse
Hmmm... it seems that your partitions are different as dm-9 is not known... strange ;-)
Could you try:
adb devices
adb shell ls /dev/block/dm*

Moto-J said:
Hmmm... it seems that your partitions are different as dm-9 is not known... strange ;-)
Could you try:
adb devices
adb shell ls /dev/block/dm*
Click to expand...
Click to collapse
C:\Users\Home\Downloads\Motorola>adb devices
List of devices attached
ZY22CCJ22P recovery
C:\Users\Home\Downloads\Motorola>adb shell ls /dev/block/dm*
/dev/block/dm-0 /dev/block/dm-3 /dev/block/dm-6
/dev/block/dm-1 /dev/block/dm-4 /dev/block/dm-7
/dev/block/dm-2 /dev/block/dm-5 /dev/block/dm-8

Timmons said:
C:\Users\Home\Downloads\Motorola>adb devices
List of devices attached
ZY22CCJ22P recovery
C:\Users\Home\Downloads\Motorola>adb shell ls /dev/block/dm*
/dev/block/dm-0 /dev/block/dm-3 /dev/block/dm-6
/dev/block/dm-1 /dev/block/dm-4 /dev/block/dm-7
/dev/block/dm-2 /dev/block/dm-5 /dev/block/dm-8
Click to expand...
Click to collapse
Ok, it seems you do not have dm-9, so indeed partitions are different.
What I have done to find out what is what is the following:
adb shell mkdir /mnt/tmpdir
adb shell mount /dev/block/dm-0 /mnt/tmpdir
adb shell ls mnt/tmpdir
Then you see what the content is of dm-0 so you know which dir it is
After that you can do
adb shell umount /mnt/tmpdir
adb shell mount /dev/block/dm-1
adb shell ls mnt/tmpdir
etc....
It seems you have to find the right setup for mounting the drives, after that you can slightly modify the script and use it for your phone.

Related

Unroot for linux

Heres a modded linux script based on the defyroot script to unroot your defy
Code:
#!/bin/bash
# execute as bash root_Defy.v2
# Following Bin4ry instructions
# Using http://c-skills.blogspot.com/2010/07/android-trickery.html exploit
# See http://intrepidusgroup.com/insight/2010/09/android-root-source-code-looking-at-the-c-skills/ for an explanation of the exploit
ADB="./adblinux"
if [ ! -e $ADB ] ; then
echo "adb not found! Cannot continue." ;
exit 1 ;
fi
chmod +x $ADB
if [ $(grep -ic 22b8 /etc/udev/rules.d/51-android.rules) -eq 0 ] ; then
echo "SUBSYSTEM=="usb", ATTRS{idVendor}==\"22b8\", MODE=\"0666\"" >> /etc/udev/rules.d/51-android.rules ;
fi
if [ $($ADB devices | grep -c device$) -ne 1 ] ; then
echo "Too many devices attached: exiting!" ;
exit 1;
fi
SERIALNO=`$ADB devices | grep device$ | cut -f1`
if [ $? -eq 0 ] ; then
echo "Found device $SERIALNO" ;
else
echo "Error searching device number!" ;
exit 1;
fi
for file in rageagainstthecage su Superuser.apk ; do
echo -n "Pushing $file: " ;
$ADB -s $SERIALNO push $file /data/local/tmp/$file ;
echo "done" ;
done
#$ADB -s $SERIALNO push rageagainstthecage /data/local/tmp/rageagainstthecage
#$ADB -s $SERIALNO push su /data/local/tmp/su
#$ADB -s $SERIALNO push Superuser.apk /data/local/tmp/Superuser.apk
echo -n "Making rageagainstthecage executable and executing it: "
$ADB -s $SERIALNO shell chmod 755 /data/local/tmp/rageagainstthecage
$ADB -s $SERIALNO shell /data/local/tmp/rageagainstthecage
echo "done"
echo "Waiting 15 sec for phone adbd to restart before continuing"
sleep 15
echo -n "Remounting filesystem in read-write mode: "
$ADB -s $SERIALNO shell mount -o remount,rw -t ext3 /dev/block/mmcblk1p21 /system
echo "done"
echo -n "Removing su command: "
$ADB -s $SERIALNO shell rm /system/bin/su
echo "done"
echo -n "Removing Superuser apk: "
$ADB -s $SERIALNO shell rm /system/app/Superuser.apk
echo "done"
exit 0
added to linux tools, thanks!
By editing the original I could ensure that only what was created in the original, was altered, although in theory you should be able to strip or add anyfiles you want in the same way.
Works for sure on fedora 15 and opensuse11.4 and any the original script works on.

Help rooting with Mac please

Hello all,
I really would appreciate some help rooting my AT&T Skyrocket. I have spent at least 7 hours trying to figure out this stuff. I have downloaded the super easy one click root thing and followed everything to a T as far as I can tell. It has been really painful learning all this stuff.
I clicked the debugging icon under development on the phone.
I read the read me file and put in the correct commands in terminal to initiate the linux-mac.sh file. I
The program actually starts running and this is what is on my terminal display..
Root for the Samsung Skyrocket
By Revolutionary
One Click Done by
Shabbypenguin
Press any key to continue...Starting adb server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
You need to enable usb debugging first
Go to settings > applications > development
* Running exploit...
error: device not found
error: device not found
error: device not found
deleting all yo ****
Wait for phone to reconnect...
*******************************************************
It stops at the wait for phone to connect line and just sits there. I have left it there for ten minutes and nothing changed.
I would really appreciate any help that I could get.
Dave
Add these two lines after "echo wait for phone to reconnect"
$adb wait-for-device
$adb remount
Obviously open the file in text edit to edit these.
(thanks to @narkee for this)
Sent from my SAMSUNG-SGH-I727 using XDA App
Thanks for the reply
Thank you for the reply.
I opened my file to put these in and it looks like I did put one of the lines in from some other source I found on the internet and the second line you mention is already in my file. Here is a copy of my script. Again, any help would be appreciated. Thank you
#!/bin/bash
# Unix OS Sniffer and $adb setup by Firon
platform=`uname`;
adb="adb";
if [ $(uname -p) == 'powerpc' ]; then
echo "Sorry, this won't work on PowerPC machines."
exit 1
fi
cd "$(dirname "$0")"
if [ -z $(which adb) ]; then
adb="./adb";
if [ "$platform" == 'Darwin' ]; then
mv adb.osx $adb > /dev/null 2>&1
fi
fi
chmod +x $adb
# End section, thanks Firon!
echo
clear
echo
echo "Root for the Samsung Skyrocket"
echo
echo "By Revolutionary"
echo
echo "One Click Done by"
echo "Shabbypenguin"
echo
read -n1 -s -p "Press any key to continue..."
echo -e "Starting adb server"
if [ -z $(which sudo 2>/dev/null) ]; then
$adb kill-server
else
sudo $adb kill-server
fi
if [ -z $(which sudo 2>/dev/null) ]; then
$adb start-server
else
sudo $adb start-server
fi
echo "You need to enable usb debugging first"
echo "Go to settings > applications > development"
sleep 2
echo "* Running exploit..."
$adb push zergRush /data/local/
$adb shell chmod 755 /data/local/zergRush
$adb shell /data/local/zergRush
echo "deleting all yo ****"
echo "Wait for phone to reconnect..."
$adb wait-for-device
$adb remount
$adb push rootsetup /data/local/tmp/rootsetup
$adb shell chmod 755 /data/local/tmp/rootsetup
$adb shell /data/local/tmp/rootsetup
$adb shell rm /data/local/tmp/rootsetup
$adb shell sync
echo "Copying files onto phone..."
$adb push su /system/xbin/su
$adb push Superuser.apk /system/app/Superuser.apk
$adb push busybox /system/xbin/busybox
$adb push remount /system/xbin/remount
echo "Setting permissions..."
$adb shell chmod 755 /system/xbin/busybox
$adb shell chmod 755 /system/xbin/remount
$adb shell chown root.shell /system/xbin/su
$adb shell chmod 4755 /system/xbin/su
$adb shell ln -s /system/xbin/su /system/bin/su
echo "Installing busybox..."
$adb shell /system/xbin/busybox --install -s /system/xbin
echo "Cleaning up files..."
sleep 5;
$adb shell rm /data/local/tmp/*
$adb shell rm /data/local/zergRush
$adb reboot
if [ -z $(which sudo 2>/dev/null) ]; then
$adb kill-server
else
sudo $adb kill-server
fi
echo "All done!"
echo
read -n1 -s -p "Press any key to exit the script."
echo
UPDATE!! Original poster here. For whoever might stumble upon this in the future....I used the exact same method on my iMac as I had my Macbook and was able to root the phone right away. I don't know why the desktop worked but the laptop didn't but it did. Good luck to others that try to root. It was a painful learning curve considering I have never used any terminal commands before, but I could probably root this phone again in about five minutes.
That's odd but glad it worked! I've rooted on both and both worked fine for me. Hmmm
Sent from my SAMSUNG-SGH-I727 using XDA App

[ROOT] Tianji X720D

Hi guys,
first of all, I'm noob on Android, plus I'm Italian, my english is not really good, I apologize for that.
I searched a lot, but I found nothing on this forum about this smartphone, nor on google.
I searched for Haipai X720D, ONE XC, HTC EVO 4G, any X720D related, but for various reasons nothing really satisfied me.. are they really compatible with my phone? Probably, but I doubt that. Benchmarks are quite different (build, brand, different antutu scores...).
So, just to let people know it is possible, "hey, it just worked! don't be afraid, I did that", I wrote this little guide.
1) I have Windows 8 Pro
If you have an older Windows release, it is possible you are going to have more trouble, as always.
2) Drivers -> You need to install "Android Composite ADB Interface"
For me it was a big problem, because you can't find any driver around, no real "Tianji" website to find some kind of support or update.
I was relying on this guide (HERE related to "unrevoked" tool, but I found out their modified drivers to be just crappy and I couldn't install due to some checksum problem they have. Still, this link is a good guide about "how to" install the right driver.
I hoped to find something on google with ID_Hardware "USB\VID_0BB4&PID_0C03&REV_0255&MI_01", but I didn't find anything to download, just a couple of "driver update" services who really had something, but pretended to install software on your PC.
Tired of wasting my time, I decided to try "driver identifier" website because they offer a free service for 1 day, just what I needed. (I don't know if I can post link here, so if you need it, just use google). It worked and now I've a ZIP ready to install just following instructions in "unrevoked" guide.
3) Root tool
Thanks to Bin4ry on xda-developers forum for his great script. You can find it on this thread: sorry guy, I can't write on your thread due to xda-developer policies, I hope you understand.
You need to choose method 1: Normal method.
This script allows you to rollback, so if something goes wrong, just launch tha batch again and select Rollback option.
But, you know, nothing is perfect, and his batch script is still a little :victory: crappy :victory: to work with this smartphone: You need to reboot your device a couple of times, but it doesnt wait for your device to resume, it just runs in timeout and because of that, it does a lot of crappy things.
You need to modify RUNME.BAT file like that:
Code:
@echo off
COLOR 0A
echo ======================================================================
echo = This script will root your Android phone with adb restore function =
echo = Script by Bin4ry (thanks to Goroh_kun and tkymgr for the idea) =
echo = Idea for Tablet S from Fi01_IS01 =
echo = (22.11.2012) v17 =
echo ======================================================================
echo Tianji === NORMAL mode
echo.
:CHOICE
set nxt=0
set ric=0
echo Device type:
echo 1) Normal
echo 2) Special (for example: Sony Tablet S, Medion Lifetab)
echo.
echo x) Unroot
echo.
set /p type=Make a choice:
if %type% == 1 GOTO TEST
if %type% == 2 GOTO TABSMENU
if %type% == x GOTO UNROOT
echo.
echo Please Enter a valid number (1 to x)
echo.
GOTO CHOICE
:TEST
echo Checking if i should run in Normal Mode or special Sony Mode
echo Please connect your device with USB-Debugging enabled now
stuff\adb.exe wait-for-device
stuff\adb.exe pull /system/app/Backup-Restore.apk . > NUL
stuff\adb.exe pull /system/bin/ric . > NUL
if EXIST ric (set ric=1) else (echo .)
if EXIST Backup-Restore.apk (GOTO XPS) else (echo .)
GOTO OTHER
:UNROOT
set /p unr=Really (y/n) ?
IF %unr% == n GOTO CHOICE
stuff\adb.exe push stuff\busybox /data/local/tmp/busybox
stuff\adb.exe shell "chmod 755 /data/local/tmp/busybox"
stuff\adb.exe shell "su -c '/data/local/tmp/busybox mount -o remount,rw /system'"
stuff\adb.exe shell "su -c 'rm /system/bin/su'"
stuff\adb.exe shell "su -c 'rm /system/app/Superuser.apk'"
GOTO FINISH
:TABSMENU
echo.
echo Special mode:
echo 1) Root
echo 2) Rollback
set /p tabtype=Make a choice:
if %tabtype% == 1 GOTO TABS
if %tabtype% == 2 GOTO TABS_RB
:TABS
echo.
echo Tablet S mode enabled!
echo.
GOTO START
:XPS
echo.
echo Found Sony Backup-Restore.apk
echo LT26,LT22 etc. mode enabled!
echo.
del Backup-Restore.apk
if %ric% == 1 (del ric) else (echo .)
set NXT=1
GOTO START
:TABS_RB
echo.
echo Tablet S Roll Back
echo.
echo Please connect device with ADB-Debugging enabled now....
stuff\adb.exe wait-for-device
FOR /F "tokens=1 delims=" %%A in ('stuff\adb.exe shell "if [ -d /data/app- ]; then echo 1 ; else echo 0 ; fi"') do SET tabs_app=%%A
if %tabs_app% == 1 GOTO TABS_RB_1
if %tabs_app% == 0 GOTO TABS_RB_2
:TABS_RB_1
stuff\adb.exe shell "rm -r /data/data/com.android.settings/a/*"
stuff\adb.exe restore stuff/tabletS.ab
echo Please look at your device and click "Restore my data"
echo.
stuff\adb.exe shell "while [ ! -d /data/data/com.android.settings/a/file99 ] ; do echo 1; done" > NUL
echo 1st RESTORE OK, hit ENTER to continue.
pause
stuff\adb.exe shell "rm -r /data/data/com.android.settings/a"
stuff\adb.exe restore stuff/tabletS.ab
echo Please look at your device and click "Restore my data"
echo.
stuff\adb.exe shell "while : ; do ln -s /data /data/data/com.android.settings/a/file99; [ -f /data/file99 ] && exit; done" > NUL
stuff\adb.exe shell "rm -r /data/file99"
echo Achieved! hit ENTER to continue.
echo.
pause
stuff\adb.exe shell "mv /data/system /data/system3"
stuff\adb.exe shell "mv /data/system- /data/system"
stuff\adb.exe shell "mv /data/app /data/app3"
stuff\adb.exe shell "mv /data/app- /data/app"
echo "Roll back compelted."
GOTO FINISH
:TABS_RB_2
echo.
echo.
echo "Roll back failed. /data/app- not found."
echo.
echo.
GOTO FINISH
:eek:THER
echo.
echo Normal Mode enabled!
if %ric% == 1 (del ric) else (echo .)
echo.
:START
stuff\adb.exe wait-for-device
IF %type% == 2 GOTO TABTRICK
echo Pushing busybox....
stuff\adb.exe push stuff/busybox /data/local/tmp/.
echo Pushing su binary ....
stuff\adb.exe push stuff/su /data/local/tmp/.
echo Pushing Superuser app
stuff\adb.exe push stuff/Superuser.apk /data/local/tmp/.
echo Making busybox runable ...
stuff\adb.exe shell chmod 755 /data/local/tmp/busybox
if %ric% == 1 (stuff\adb.exe push stuff/ric /data/local/tmp/ric) else (echo .)
IF %nxt% == 1 GOTO XPSTRICK
stuff\adb.exe restore stuff/fakebackup.ab
echo Please look at your device and click RESTORE!
echo If all is successful i will tell you, if not this shell will run forever.
echo Running ...
stuff\adb.exe shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > NUL
echo Successful, going to reboot your device in 10 seconds!
ping -n 10 127.0.0.1 > NUL
stuff\adb.exe reboot
echo Waiting for device to show up again....
pause
ping -n 10 127.0.0.1 > NUL
stuff\adb.exe wait-for-device
GOTO NORMAL
:TABTRICK
stuff\adb.exe install -s stuff/Term.apk
stuff\adb.exe push stuff/busybox /data/local/tmp/.
stuff\adb.exe push stuff/su /data/local/tmp/.
stuff\adb.exe push stuff/Superuser.apk /data/local/tmp/.
stuff\adb.exe push stuff/rootkittablet.tar.gz /data/local/tmp/rootkittablet.tar.gz
stuff\adb.exe shell "chmod 755 /data/local/tmp/busybox"
stuff\adb.exe shell "/data/local/tmp/busybox tar -C /data/local/tmp -x -v -f /data/local/tmp/rootkittablet.tar.gz"
stuff\adb.exe shell "chmod 644 /data/local/tmp/VpnFaker.apk"
stuff\adb.exe shell "touch -t 1346025600 /data/local/tmp/VpnFaker.apk"
stuff\adb.exe shell "chmod 755 /data/local/tmp/_su"
stuff\adb.exe shell "chmod 755 /data/local/tmp/su"
stuff\adb.exe shell "chmod 755 /data/local/tmp/onload.sh"
stuff\adb.exe shell "chmod 755 /data/local/tmp/onload2.sh"
stuff\adb.exe shell "rm -r /data/data/com.android.settings/a/*"
stuff\adb.exe restore stuff/tabletS.ab
echo Please look at your device and click "Restore my data"
echo.
stuff\adb.exe shell "while [ ! -d /data/data/com.android.settings/a/file99 ] ; do echo 1; done" > NUL
ping -n 3 127.0.0.1 > NUL
echo 1st RESTORE OK, hit ENTER to continue.
pause
stuff\adb.exe shell "rm -r /data/data/com.android.settings/a"
stuff\adb.exe restore stuff/tabletS.ab
echo Please look at your device and click "Restore my data"
echo.
stuff\adb.exe shell "while : ; do ln -s /data /data/data/com.android.settings/a/file99; [ -f /data/file99 ] && exit; done" > NUL
stuff\adb.exe shell "rm -r /data/file99"
ping -n 3 127.0.0.1 > NUL
echo Achieved! hit ENTER to continue.
echo.
pause
stuff\adb.exe shell "/data/local/tmp/busybox cp -r /data/system /data/system2"
stuff\adb.exe shell "/data/local/tmp/busybox find /data/system2 -type f -exec chmod 666 {} \;"
stuff\adb.exe shell "/data/local/tmp/busybox find /data/system2 -type d -exec chmod 777 {} \;"
stuff\adb.exe shell "mv /data/system /data/system-"
stuff\adb.exe shell "mv /data/system2 /data/system"
stuff\adb.exe shell "mv /data/app /data/app-"
stuff\adb.exe shell "mkdir /data/app"
stuff\adb.exe shell "mv /data/local/tmp/VpnFaker.apk /data/app"
stuff\adb.exe shell "/data/local/tmp/busybox sed -f /data/local/tmp/packages.xml.sed /data/system-/packages.xml > /data/system/packages.xml"
stuff\adb.exe shell "sync; sync; sync"
echo Need to reboot now!
stuff\adb.exe reboot
ping -n 3 127.0.0.1 > NUL
echo Waiting for device to come up again....
pause
stuff\adb.exe wait-for-device
echo Unlock your device, a Terminal will show now, type this 2 lines, after each line press ENTER
echo /data/local/tmp/onload.sh
echo /data/local/tmp/onload2.sh
echo after this is done press a key here in this shell to continue!
echo If the shell on your device does not show please re-start the process!
stuff\adb.exe shell "am start -n com.android.vpndialogs/.Term"
pause
GOTO TABTRICK1
:TABTRICK1
stuff\adb.exe push stuff/script1.sh /data/local/tmp/.
stuff\adb.exe shell "chmod 755 /data/local/tmp/script1.sh"
stuff\adb.exe shell "/data/local/tmp/script1.sh"
echo Almost complete! Reboot and cleanup.
stuff\adb.exe reboot
ping -n 3 127.0.0.1 > NUL
echo Waiting for device to come up again....
pause
stuff\adb.exe wait-for-device
stuff\adb.exe shell "su -c 'rm -r /data/app2'"
stuff\adb.exe shell "su -c 'rm -r /data/system2'"
stuff\adb.exe shell "su -c 'rm -r /data/local/tmp/*'"
GOTO FINISH
:XPSTRICK
set %NXT%=0
echo Pushing fake Backup
stuff\adb.exe push stuff\RootMe.tar /data/local/tmp/RootMe.tar
stuff\adb.exe shell "mkdir /mnt/sdcard/.semc-fullbackup > /dev/null 2>&1"
echo Extracting fakebackup on device ...
stuff\adb.exe shell "cd /mnt/sdcard/.semc-fullbackup/; /data/local/tmp/busybox tar xf /data/local/tmp/RootMe.tar"
echo Watch now your device. Select the backup named RootMe and restore it!
stuff\adb.exe shell "am start com.sonyericsson.vendor.backuprestore/.ui.BackupActivity"
echo If all is successful i will tell you, if not this shell will run forever.
echo Running ......
stuff\adb.exe shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" > NUL
echo.
echo Good, it worked! Now we are rebooting soon, please be patient!
ping -n 3 127.0.0.1 > NUL
stuff\adb.exe shell "rm -r /mnt/sdcard/.semc-fullbackup/RootMe"
stuff\adb.exe reboot
ping -n 10 127.0.0.1 > NUL
echo Waiting for device to come up again....
pause
stuff\adb.exe wait-for-device
:NORMAL
IF %ric% == 1 GOTO RICSTUFF
echo Going to copy files to it's place
stuff\adb.exe shell "/data/local/tmp/busybox mount -o remount,rw /system && /data/local/tmp/busybox mv /data/local/tmp/su /system/xbin/su && /data/local/tmp/busybox mv /data/local/tmp/Superuser.apk /system/app/Superuser.apk && /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox && chown 0.0 /system/xbin/su && chmod 06755 /system/xbin/su && chmod 655 /system/app/Superuser.apk && chmod 755 /system/xbin/busybox && rm /data/local.prop && reboot"
GOTO FINISH
:RICSTUFF
echo Going to copy files to it's place
stuff\adb.exe shell "/data/local/tmp/busybox mount -o remount,rw /system && /data/local/tmp/busybox mv /data/local/tmp/ric /system/bin/ric && chmod 755 /system/bin/ric && /data/local/tmp/busybox mv /data/local/tmp/su /system/xbin/su && /data/local/tmp/busybox mv /data/local/tmp/Superuser.apk /system/app/Superuser.apk && /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox && chown 0.0 /system/xbin/su && chmod 06755 /system/xbin/su && chmod 655 /system/app/Superuser.apk && chmod 755 /system/xbin/busybox && rm /data/local.prop && reboot"
GOTO FINISH
:FINISH
echo You can close all open command-prompts now!
echo After reboot all is done! Have fun!
echo Bin4ry
pause
5) Just did it!
Now you have only to download Root App Delete tool and remove all crappy chinese apps you'll never use. If it works, you did it! cheers!
Hope you enjoied this guide, I tried to be as simple as possible
Burstina
Hey man !!! please make back up of your off software !!! i have brick my phone !!!!
PeBBa said:
Hey man !!! please make back up of your off software !!! i have brick my phone !!!!
Click to expand...
Click to collapse
wait, what did you do?
did you try factory reset?
burstina - no man i put in ROM flash other firmware !
PeBBa said:
burstina - no man i put in ROM flash other firmware !
Click to expand...
Click to collapse
this is bad... I'm new on smartphone world, I'll tell you something once I'll make a succesfull firmware backup.
btw, I tried using nandroid backup, even if there is no correct patch for our device, I was just able to do something I still can't fully understand:
something like that... it is 1 Gb friend. Perhaps there is another way to do a backup for you, any idea?
2.163.712 .android_secure.vfat.tar
10.240 cache.ext4.tar
286.050.304 data.ext4.tar
256 nandroid.md5
473.817.088 sd-ext.vfat.tar
357.468.160 system.ext4.tar
Does lewa os support this phone ?
I'm enjoying lewa on zp100 and this tianji looks very similar in build.
UPDATE:
with linux I used the RunMe.sh provided by Bin4ry (no edit was needed)
Now that it's rooted I just need to find and flash a CWM recovery and then I'd start trying looking for lewa
Here are some guides about the recovery question:
http://omappedia.org/wiki/Android_eMMC_Booting#Modifying_.IMG_Files (how recovery.img is built)
http://andwise.net/?p=403 (unpack/repack system)
http://forum.xda-developers.com/showthread.php?t=1587411 (mtk related perl script to unpack/repack recovery - it works)
http://www.twobitcoder.com/?p=158 (curious if I could open this page)
Do you think we can use cwm and rom from this one http://forum.xda-developers.com/showthread.php?t=1899592 ?
I'm almost sure the difference between haipad and tianji is in screen size only
---------- Post added at 03:21 PM ---------- Previous post was at 02:51 PM ----------
UPDATE:
I found lewa for haipad x720d !!!
http://forum.china-iphone.ru/sborka-lewa-os-dlya-haipai-x720d-t27041.html
I've uploaded the full nandroid here https://mega.co.nz/#F!RI5QHS4C!eJ39DF-LaQEzQey_fFCwuA.
I'd like a cwm recovery and a firefox os rom for it
Also found this:
http://forum.xda-developers.com/showthread.php?t=1825722
Tianji X720D
Hi suoko you had uploaded the full nandroid here - mega.co.nz/#F!RI5QHS4C!eJ39DF-LaQEzQey_fFCwuA[
Are all those files refer to Tianji X720D phone? Can we use it to flash the phone?
Thanks.:fingers-crossed:
Install Mt657xRepartition_en.apk and choose 2.5gb to have a larger storage for apps
Inviato dal mio GT-I9300 con Tapatalk 2

[Tutorial] Creating adb script to flash ROM

Dear all
I know there are numbers of you who want to start developing for our XL. There are numbers of way to flashROM. Either you can flash your ROM via system.img or ROM.zip etc etc. And here are we to explore creating rom via adb script. The earlier two ROM flashing mean require you to have unlocked bootloader but adb script ROM can be flashed on L/UL mobile devices. Lets get started with:
NOTE: The phone needs to be rooted to flash adb script. For your assistance I will attach a ROM template along with this post.
Click to expand...
Click to collapse
Preparation
Please create two folders inside your working folder with name [Your ROM Name] and [Your ROM Name_PC].
Copy all your system files/folder inside your [Your ROM Name] folder.
Please avoid creating folder within folder to avoid confusion. For example: if you are adding ringtones in your ROM consider creating folder inside [Your ROM Name] with name ringtones instead of creating folder structure like media/audio/ringtones.
In [Your ROM Name_PC] folder create a folder with name adb and copy adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll inside it from your android sdk. If you are using my template then you can skip this step as i have already included adb folder inside [Your ROM Name_PC]
Scripting ADB Flasher
1. Create a new text file and rename it as Setup.bat. Remember to remove .txt extension and replace it with .bat extension.
Right Click on Setup.bat and click Edit. The file will open in notepad.
2. Copy Following lines of Code and paste it in your Setup.bat file.
HTML:
[user=279333]@ECHO[/user] off
TITLE [YOUR ROM NAME] by [Dev_Name] [Version 1.0]
COLOR 70
mode con:cols=100 lines=40
ECHO.
Pause
ECHO Waiting For Device.....
[user=302893]@adb[/user]\adb wait-for-device
[user=302893]@adb[/user]\adb shell "su -c 'stop'"
ECHO Getting System access.....
[user=302893]@adb[/user]\adb shell "su -c 'mount -o rw,remount /system/ /system/'"
This will mount system folder with read write privilege.
3. Before flashing your apks and other stuff you need to make sure you remove corresponding stuffs from the system. I have listed generic folders inside the code below please add/delete lines as per your application preferences.
HTML:
ECHO Removing system files
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/app/*.odex'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/app/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/fonts/*.ttf'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/framework/*.jar'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/framework/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/framework/*.odex'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/ringtones/*.ogg'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/alarms/*.ogg'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/notifications/*.ogg'"
[user=302893]@adb[/user]\adb shell "su -c 'rm /system/media/audio/ui/*.ogg'"
ECHO System files removed successfully!
ECHO.
4. Copy each and every content of each folder you want to flash in corresponding folders of the system. Below is the sample code please consider adding/deleting as per your preferences.
HTML:
ECHO COPYING FILES.....
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/framework/* /system/framework/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/app/* /system/app/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/fonts/* /system/fonts/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/media/* /system/media/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/ringtones/* /system/media/audio/ringtones/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/alarms/* /system/media/audio/alarms/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/notifications/* /system/media/audio/notifications/'"
[user=302893]@adb[/user]\adb shell "su -c 'cp /sdcard/[Your ROM Name]/ui/* /system/media/audio/ui/'"
5. After you have copied all your files/folders into the system you need to add permission in case of framework and apps and any other folders requiring special permission. Below is the sample code please consider adding/deleting as per your preferences.
HTML:
ECHO SETTING PERMISSION.....
[user=302893]@adb[/user]\adb shell "su -c 'chown 0.0 /system/framework/*.jar'"
[user=302893]@adb[/user]\adb shell "su -c 'chmod 0644 /system/framework/*.jar'"
[user=302893]@adb[/user]\adb shell "su -c 'chown 0.0 /system/framework/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'chmod 0644 /system/framework/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'chown 0.0 /system/app/*.apk'"
[user=302893]@adb[/user]\adb shell "su -c 'chmod 0644 /system/app/*.apk'"
6. We are almost done now. Please consider copying following codes and adding them at the end of your script to remount system as read-only and rebooting the mobile device.
HTML:
ECHO.
ECHO --------------------------------------------------------
ECHO ----------ROM INSTALLED SUCCESSFULLY------------
ECHO --------------------------------------------------------
ECHO.
[user=302893]@adb[/user]\adb shell "su -c 'mount -o ro,remount /system/ /system/'"
ECHO Rebooting System
[user=302893]@adb[/user]\adb reboot
ECHO.
ECHO Please be patient till device reboot!
ECHO.
ECHO.
ECHO --------------------------------------------------------
ECHO -----------------------THANK YOU------------------------
ECHO --------------------------------------------------------
ECHO.
pause
7. Now zip both [Your ROM Name] and [Your ROM Name_PC] folders and upload them to the file sharing sites of your convenience.
If all goes well you will have a superb ROM to share here at XDA. Please find the attached template along with this post.
If you like this tutorial please press thanx at the bottom of the post.
Have a happy time porting.
CREDITS will be highly appreciated.

How to Unpack Boot Image and remove LG RCT and Triton Lgv20 (Linux & root only)

STANDARD DISCLAIMER: I am not responsible for any damages caused to your phone. Use this guide at your own risk there is no warranty or guarantee.
I only know how to do this in Linux in the terminal. This has only been done on Stock Oreo 8.0, may not work on Nougat never tested. This mod will speed up your phone. We are going to remove a very small program "rctd" that's buried in the phones boot image file. Also there is an antivirus scanner burred in the boot image, it slows the phone down by scanning every file.
This guide is my notes on what I did to remove LG RCT from my H910 Lgv20. But you can use this guide to remove LG RCT from your Lgv20.
guide updated on 6-28-22
Requirements:
Root/Twrp
Lgv20
Stock Oreo 8.0
Linux
You can just copy and paste the commands in the Linux terminal.
In the Linux terminal paste:
install: abootimg
Ubuntu: sudo apt-get install abootimg
Arch: yay -S abootimg
install: fastboot & adb
Ubuntu: sudo apt-get install android-tools-adb android-tools-fastboot
Arch: sudo pacman -S android-tools
Reboot phone into twrp. Connect phone via usb cable. In the Linux terminal paste:
sudo su
mkdir /tmp/test
cd /tmp/test
Get your boot.img
adb shell dd if=/dev/block/bootdevice/by-name/boot of=/tmp/boot.img
adb pull /tmp/boot.img /tmp/test
sync
ls
the boot.img should be on your computer in /tmp/test/
You can unplug the usb cable from the phone. But stay in twrp we will need that later.
abootimg -x /tmp/test/boot.img
mkdir /tmp/test/initrd
cd /tmp/test/initrd
cat ../initrd.img | gunzip | cpio -vid
Going to remove rctd and lge_fota updates & comment out LG RCT access also going to comment out lge_handle_panic. And comment out triton service. You should be able to just copy all and paste all at once. Also I found a speed tweak by changing dalvik.vm.dex2oat-Xmx=512m to dalvik.vm.dex2oat-Xmx=256m will increase speed of phone.
rm /tmp/test/initrd/sbin/bnrd
rm /tmp/test/initrd/sbin/rctd
rm /tmp/test/initrd/sbin/lge_fota
sed -i '605 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '964 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '20 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '790 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '1029 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '1057,1058 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '1067 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '10 s/^/#/' /tmp/test/initrd/nonplat_seapp_contexts
sed -i '485 s/^/#/' /tmp/test/initrd/nonplat_property_contexts
sed -i '1343 s/^/#/' /tmp/test/initrd/nonplat_file_contexts
sed -i '129 s/^/#/' /tmp/test/initrd/init.msm8996_core.rc
sed -i '133 s/^/#/' /tmp/test/initrd/init.msm8996_core.rc
sed -i '137 s/^/#/' /tmp/test/initrd/init.msm8996_core.rc
sed -i '141 s/^/#/' /tmp/test/initrd/init.msm8996_core.rc
sed -i '145 s/^/#/' /tmp/test/initrd/init.msm8996_core.rc
sed -i '7,13 s/^/#/' /tmp/test/initrd/init.elsa.power.rc
sed -i '17 s/^/#/' /tmp/test/initrd/init.elsa.power.rc
sed -i '19,29 s/^/#/' /tmp/test/initrd/init.elsa.power.rc
sed -i '32,33 s/^/#/' /tmp/test/initrd/init.elsa.power.rc
sed -i '83,105 s/^/#/' /tmp/test/initrd/init.elsa.power.rc
sed -i '232,233 s/^/#/' /tmp/test/initrd/init.elsa_core.rc
you can check to make sure it worked with this command
clear
ls /tmp/test/initrd/sbin/bnrd
ls /tmp/test/initrd/sbin/rctd
ls /tmp/test/initrd/sbin/lge_fota
sed -n 605p /tmp/test/initrd/nonplat_file_contexts
sed -n 964p /tmp/test/initrd/nonplat_file_contexts
sed -n 20p /tmp/test/initrd/nonplat_file_contexts
sed -n 790p /tmp/test/initrd/nonplat_file_contexts
sed -n 1029p /tmp/test/initrd/nonplat_file_contexts
sed -n 1057,1058p /tmp/test/initrd/nonplat_file_contexts
sed -n 1067p /tmp/test/initrd/nonplat_file_contexts
sed -n 10p /tmp/test/initrd/nonplat_seapp_contexts
sed -n 485p /tmp/test/initrd/nonplat_property_contexts
sed -n 1343p /tmp/test/initrd/nonplat_file_contexts
sed -n 129p /tmp/test/initrd/init.msm8996_core.rc
sed -n 133p /tmp/test/initrd/init.msm8996_core.rc
sed -n 137p /tmp/test/initrd/init.msm8996_core.rc
sed -n 141p /tmp/test/initrd/init.msm8996_core.rc
sed -n 145p /tmp/test/initrd/init.msm8996_core.rc
sed -n 7,13p /tmp/test/initrd/init.elsa.power.rc
sed -n 17p /tmp/test/initrd/init.elsa.power.rc
sed -n 19,29p /tmp/test/initrd/init.elsa.power.rc
sed -n 32,33p /tmp/test/initrd/init.elsa.power.rc
sed -n 83,105p /tmp/test/initrd/init.elsa.power.rc
sed -n 232,233p /tmp/test/initrd/init.elsa_core.rc
This is what it should look like. If not, then do not flash the modded myboot.img. I am not 100% sure all Lgv20 boot images are the same. I am 99% sure they should be the same, but just in case.
ls: cannot access '/tmp/test/initrd/sbin/bnrd': No such file or directory
ls: cannot access '/tmp/test/initrd/sbin/rctd': No such file or directory
ls: cannot access '/tmp/test/initrd/sbin/lge_fota': No such file or directory
#/dev/block/platform/.*/by-name/rct u:object_r:rct_block_device:s0
#/dev/rct u:object_r:rct_device:s0
#/(system/vendor|vendor)/bin/triton u:object_r:triton_exec:s0
#/sys/devices/system/cpu/triton(/.*)? u:object_r:sysfs_triton:s0
#/dev/triton:io u:object_r:triton_device:s0
#/dev/socket/bnrd u:object_r:bnrd_socket:s0
#/dev/socket/ccmd u:object_r:ccmd_socket:s0
#/system/bin/ccmd u:object_r:ccmd_exec:s0
#user=_app seinfo=platform name=com.lge.rctprovider domain=platform_app type=app_data_file
#sys.lge.rooted u:object_r:system_prop:s0
#/sys/module/lge_handle_panic/parameters/gen_modem_panic u:object_r:sysfs_gen_modem_panic:s0
# write /sys/module/lge_handle_panic/parameters/cancel_boot_lockup_detect 1
# write /sys/module/lge_handle_panic/parameters/pause_boot_lockup_detect 1
# write /sys/module/lge_handle_panic/parameters/pause_boot_lockup_detect 0
# write /sys/module/lge_handle_panic/parameters/cancel_boot_lockup_detect 1
# write /sys/module/lge_handle_panic/parameters/powerctl_lockup_detect ${sys.powerctl}
#service triton /system/vendor/bin/triton
# class main
# user root
# group system
# socket triton-client stream 660 system system
# disabled
# oneshot
# start triton
# write /sys/devices/system/cpu/triton/debug 16
# write /sys/devices/system/cpu/triton/enable 1
# write /sys/devices/system/cpu/triton/enforce 0
# write /sys/devices/system/cpu/triton/cur_policy 0
# chown system system /sys/devices/system/cpu/triton/enable
# chmod 664 /sys/devices/system/cpu/triton/enable
# chmod 600 /sys/devices/system/cpu/triton/aevents
# chmod 600 /sys/devices/system/cpu/triton/bevents
# chown system system /sys/devices/system/cpu/triton/cur_policy
# chmod 664 /sys/devices/system/cpu/triton/cur_policy
# chmod 664 /sys/devices/system/cpu/triton/debug
# chown system system /sys/devices/system/cpu/triton/enable
# chmod 644 /sys/devices/system/cpu/triton/enable
#service fg-dump /vendor/bin/sh /vendor/bin/fg_dump.sh 10 /data/logger/fg.log
# user root
# group root system
# class main
# disabled
# oneshot
#on property:persist.service.fg.enable=0
# stop fg-dump
#on property:persist.service.fg.enable=1
# restart fg-dump
#on property:persist.service.fg.enable=2
# restart fg-dump
#on property:persist.service.fg.enable=3
# restart fg-dump
#on property:persist.service.fg.enable=4
# restart fg-dump
#on property:persist.service.fg.enable=5
# restart fg-dump
#on property:persist.service.fg.enable=6
# restart fg-dump
#on property:persist.service.fg.enable=99
# restart fg-dump
# setprop ro.ssbd.session /dev/block/bootdevice/by-name/eksst
# export HALLIC_STATUS_PATH /sys/class/switch/smartcover/state
continue making the myboot.img
find . | cpio --create --format='newc' | gzip > ../myinitd.img
cd /tmp/test
nano bootimg.cfg
delete the first line move everything up one line
bootsize = 0x19b15d3
ctrl-x y enter
make the modded myboot.img file
abootimg --create myboot.img -f bootimg.cfg -k zImage -r myinitd.img
plug usb cable back into phone. Phone should still be in twrp.
Going to write all zeros to fota and rct device. Updates and LG RCT devices we don't need them. And going to remvoe the dumpstate file it saves the logcat logs to the eMMC drive and slows down the phone a lot. The logcat files will still be saved to ram up to 4M but they will be deleted when you restart or it runs out of ram. This will speed up the phone removing dumpstate. Also there is a speed tweak need to change five lines in the build.prop file.
Note: If you have already used Auto_Debloat you may get some error messages file not found that's okay. It just means Auto_Debloat took care of the files for you.
mkfs.ntfs /dev/block/bootdevice/by-name/fota
mkfs.fat /dev/block/bootdevice/by-name/rct
adb shell umount -l /system
adb shell mount /system
adb shell rm /system/vendor/bin/subsystem_ramdump
adb shell rm /system/bin/dumpstate
adb shell rm /system/etc/init/dumpstate.rc
adb shell rm /system/bin/ccmd
adb shell rm /system/vendor/bin/triton
adb shell rm /system/vendor/bin/fg_dump.sh
adb shell mount /persist
adb shell rm /persist/rct
adb shell rm /persist/rct.cfg
adb shell umount -l /persist
adb shell umount -l /system
wipe dalvik cache and cache
reboot phone into bootloader aka fastboot from twrp
fastboot flash boot myboot.img
fastboot reboot
exit out of root user
exit
You can unplug usb cable now done.
And that is what I did to remove LG RCT from my Lgv20 phone. One thing to note is that you can not flash a new kernel to the boot.img or you will loose the modded boot.img everything will be reset back to default. If you need to flash a Kernel then just mod the boot.img again afterwards.
If for some reason your phone does not boot anymore, we are going to flash the original boot.img
Power off the Lgv20, or remove battery. Hold volume down while plugging in the usb cable.
sudo su
cd /tmp/test
fastboot flash boot boot.img
fastboot reboot
exit out of root user
exit
done
reserved

Categories

Resources